diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-06-14 21:20:52 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-06-14 21:20:52 +0000 |
commit | 38a979bf95db020094769194651b91291ca0220c (patch) | |
tree | 0550abdc33ad535bd86027302d5aba7b1ca6484f /tools/gold/gold-plugin.cpp | |
parent | 774bc882fdb3bbb0558075360c6e5bc510a0bdad (diff) | |
download | external_llvm-38a979bf95db020094769194651b91291ca0220c.zip external_llvm-38a979bf95db020094769194651b91291ca0220c.tar.gz external_llvm-38a979bf95db020094769194651b91291ca0220c.tar.bz2 |
Don't produce output only if *all* files are unused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105962 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/gold/gold-plugin.cpp')
-rw-r--r-- | tools/gold/gold-plugin.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/gold/gold-plugin.cpp b/tools/gold/gold-plugin.cpp index 2b055a2..15df7d0 100644 --- a/tools/gold/gold-plugin.cpp +++ b/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); |