llvm.org GIT mirror llvm / 04e43e6
Declare variable on first use. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212403 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 6 years ago
1 changed file(s) with 5 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
260260 return LDPS_OK;
261261 }
262262
263 /// claim_file_hook - called by gold to see whether this file is one that
264 /// our plugin can handle. We'll try to open it and register all the symbols
265 /// with add_symbol if possible.
263 /// Called by gold to see whether this file is one that our plugin can handle.
264 /// We'll try to open it and register all the symbols with add_symbol if
265 /// possible.
266266 static ld_plugin_status claim_file_hook(const ld_plugin_input_file *file,
267267 int *claimed) {
268 LTOModule *M;
269268 const void *view;
270269 std::unique_ptr buffer;
271270 if (get_view) {
292291 return LDPS_OK;
293292
294293 std::string Error;
295 M = LTOModule::createFromBuffer(view, file->filesize, TargetOpts, Error);
294 LTOModule *M =
295 LTOModule::createFromBuffer(view, file->filesize, TargetOpts, Error);
296296 if (!M) {
297297 (*message)(LDPL_ERROR,
298298 "LLVM gold plugin has failed to create LTO module: %s",