From c818b3ef569b17e053f332b4a0eb36f1f0cb696e Mon Sep 17 00:00:00 2001 From: Teresa Johnson Date: Thu, 10 Dec 2015 16:11:23 +0000 Subject: [PATCH] [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 --- tools/gold/gold-plugin.cpp | 6 ++---- 1 file 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"); -- 2.34.1