summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-07-06 14:31:22 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-07-06 14:31:22 +0000
commite54d8216715f02bfdeb573c96839c8d114e83359 (patch)
tree233aeef383bec9468fd381f73ad5165a8a9b69c6 /llvm
parenta3c65096cf8618f85536fd1b2fb375a90fd5aa39 (diff)
downloadbcm5719-llvm-e54d8216715f02bfdeb573c96839c8d114e83359.tar.gz
bcm5719-llvm-e54d8216715f02bfdeb573c96839c8d114e83359.zip
Declare variable on first use.
llvm-svn: 212403
Diffstat (limited to 'llvm')
-rw-r--r--llvm/tools/gold/gold-plugin.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp
index 343a73988d1..6d52f62b210 100644
--- a/llvm/tools/gold/gold-plugin.cpp
+++ b/llvm/tools/gold/gold-plugin.cpp
@@ -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",
OpenPOWER on IntegriCloud