[llvm] r255256 - [ThinLTO] Release files in gold plugin during combined index (take 2)
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 13 16:12:21 PST 2015
On Thu, Dec 10, 2015 at 8:11 AM, Teresa Johnson via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> Author: tejohnson
> Date: Thu Dec 10 10:11:23 2015
> New Revision: 255256
>
> URL: http://llvm.org/viewvc/llvm-project?rev=255256&view=rev
> Log:
> [ThinLTO] Release files in gold plugin during combined index (take 2)
>
Could we use an RAII wrapper to ensure this is more reliably handled?
>
> Ensure we release the files even when they don't hold a function index
> summary section, by restructuring the control flow a little bit.
>
> Modified:
> llvm/trunk/tools/gold/gold-plugin.cpp
>
> Modified: llvm/trunk/tools/gold/gold-plugin.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/gold/gold-plugin.cpp?rev=255256&r1=255255&r2=255256&view=diff
>
> ==============================================================================
> --- llvm/trunk/tools/gold/gold-plugin.cpp (original)
> +++ llvm/trunk/tools/gold/gold-plugin.cpp Thu Dec 10 10:11:23 2015
> @@ -855,10 +855,8 @@ static ld_plugin_status allSymbolsReadHo
> 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");
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151213/9a36b9ca/attachment.html>
More information about the llvm-commits
mailing list