summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2015-12-10 16:11:23 +0000
committerTeresa Johnson <tejohnson@google.com>2015-12-10 16:11:23 +0000
commit9d5b71b3d201ec803382fbdc1c11d33995f321f1 (patch)
treec13a3c22cc4d078053ba873e7b6eb2ca7a7c0ede /llvm
parent28818d7840fe7b73bd0382ce3ee2b93c3ec90115 (diff)
downloadbcm5719-llvm-9d5b71b3d201ec803382fbdc1c11d33995f321f1.tar.gz
bcm5719-llvm-9d5b71b3d201ec803382fbdc1c11d33995f321f1.zip
[ThinLTO] Release files in gold plugin during combined index (take 2)
Ensure we release the files even when they don't hold a function index summary section, by restructuring the control flow a little bit. llvm-svn: 255256
Diffstat (limited to 'llvm')
-rw-r--r--llvm/tools/gold/gold-plugin.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp
index d73e9492266..e52606b8828 100644
--- a/llvm/tools/gold/gold-plugin.cpp
+++ b/llvm/tools/gold/gold-plugin.cpp
@@ -855,10 +855,8 @@ static ld_plugin_status allSymbolsReadHook(raw_fd_ostream *ApiFile) {
getFunctionIndexForFile(F, File);
// Skip files without a function summary.
- if (!Index)
- continue;
-
- CombinedIndex.mergeFrom(std::move(Index), ++NextModuleId);
+ if (Index)
+ CombinedIndex.mergeFrom(std::move(Index), ++NextModuleId);
if (release_input_file(F.handle) != LDPS_OK)
message(LDPL_FATAL, "Failed to release file information");
OpenPOWER on IntegriCloud