[PATCH] D23721: [gold/ThinLTO] Restore ThinLTO file management in gold plugin

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 16 07:12:18 PDT 2016


tejohnson added a comment.

In https://reviews.llvm.org/D23721#543923, @pcc wrote:

> This change doesn't seem right to me. If the link command has ThinLTO inputs but does not pass in the thinlto plugin option, we will release files early.


Good point (before the new API gold would only handle the file as ThinLTO with the plugin option).

> Regrettably I think we may need to move some of the memory management into the lib/LTO interface.


Since this is a gold-specific issue (particularly the way it ensures that an archive is only opened once), how about we simply check whether it is a ThinLTO file here in place of using the option? I know it is conceptually nice to not have to check the IR object type, but I think the file management is better left in the client.


Repository:
  rL LLVM

https://reviews.llvm.org/D23721





More information about the llvm-commits mailing list