summaryrefslogtreecommitdiff
path: root/tools
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
commitc818b3ef569b17e053f332b4a0eb36f1f0cb696e (patch)
treee84888b279a5973d78ea012b688bd4605ae8be69 /tools
parent0abf891ab8b4fca8d59b107796125fe1026e9abb (diff)
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255256 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/gold/gold-plugin.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/gold/gold-plugin.cpp b/tools/gold/gold-plugin.cpp
index d73e9492266..e52606b8828 100644
--- a/tools/gold/gold-plugin.cpp
+++ b/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");