mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 12:19:53 +00:00
Declare variable on first use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212403 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
245fbdf953
commit
04e43e64a9
@ -261,12 +261,11 @@ ld_plugin_status onload(ld_plugin_tv *tv) {
|
||||
return LDPS_OK;
|
||||
}
|
||||
|
||||
/// claim_file_hook - called by gold to see whether this file is one that
|
||||
/// our plugin can handle. We'll try to open it and register all the symbols
|
||||
/// with add_symbol if possible.
|
||||
/// Called by gold to see whether this file is one that our plugin can handle.
|
||||
/// We'll try to open it and register all the symbols with add_symbol if
|
||||
/// possible.
|
||||
static ld_plugin_status claim_file_hook(const ld_plugin_input_file *file,
|
||||
int *claimed) {
|
||||
LTOModule *M;
|
||||
const void *view;
|
||||
std::unique_ptr<MemoryBuffer> buffer;
|
||||
if (get_view) {
|
||||
@ -293,7 +292,8 @@ static ld_plugin_status claim_file_hook(const ld_plugin_input_file *file,
|
||||
return LDPS_OK;
|
||||
|
||||
std::string Error;
|
||||
M = LTOModule::createFromBuffer(view, file->filesize, TargetOpts, Error);
|
||||
LTOModule *M =
|
||||
LTOModule::createFromBuffer(view, file->filesize, TargetOpts, Error);
|
||||
if (!M) {
|
||||
(*message)(LDPL_ERROR,
|
||||
"LLVM gold plugin has failed to create LTO module: %s",
|
||||
|
Loading…
Reference in New Issue
Block a user