From: Teresa Johnson Date: Thu, 10 Dec 2015 16:11:23 +0000 (+0000) Subject: [ThinLTO] Release files in gold plugin during combined index (take 2) X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=c818b3ef569b17e053f332b4a0eb36f1f0cb696e;hp=0abf891ab8b4fca8d59b107796125fe1026e9abb [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 --- 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");