summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2010-06-14 21:20:52 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2010-06-14 21:20:52 +0000
commit77b6d019065f57bd33544e03c97355982f40f92c (patch)
tree0ba3a9921c4fd51ee00386a74bc1876853d5b1d2 /llvm/tools
parent067ad670b1427477d2f65cb2d3005ecb3fbe8190 (diff)
downloadbcm5719-llvm-77b6d019065f57bd33544e03c97355982f40f92c.tar.gz
bcm5719-llvm-77b6d019065f57bd33544e03c97355982f40f92c.zip
Don't produce output only if *all* files are unused.
llvm-svn: 105962
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/gold/gold-plugin.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp
index 2b055a2272f..15df7d03152 100644
--- a/llvm/tools/gold/gold-plugin.cpp
+++ b/llvm/tools/gold/gold-plugin.cpp
@@ -368,15 +368,15 @@ static ld_plugin_status all_symbols_read_hook(void) {
api_file << I->syms[i].name << "\n";
}
}
+ }
- if (options::generate_api_file)
- api_file.close();
+ if (options::generate_api_file)
+ api_file.close();
- if (!anySymbolsPreserved) {
- // This entire file is unnecessary!
- lto_codegen_dispose(cg);
- return LDPS_OK;
- }
+ if (!anySymbolsPreserved) {
+ // All of the IL is unnecessary!
+ lto_codegen_dispose(cg);
+ return LDPS_OK;
}
lto_codegen_set_pic_model(cg, output_type);
OpenPOWER on IntegriCloud