[PATCH] D23721: [gold/ThinLTO] Restore ThinLTO file management in gold plugin
Mehdi AMINI via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 19 17:31:41 PDT 2016
mehdi_amini accepted this revision.
mehdi_amini added a comment.
This revision is now accepted and ready to land.
LGTM.
================
Comment at: tools/gold/gold-plugin.cpp:833
@@ -825,1 +832,3 @@
+ HandleToInputFile.insert(std::make_pair(
+ F.leader_handle, llvm::make_unique<PluginInputFile>(F.handle)));
const void *View = getSymbolsAndView(F);
----------------
tejohnson wrote:
> mehdi_amini wrote:
> > Fo you need a map here? Can't you just push back to a vector?
> This is necessary for correct file locking when we have archives. See the first part of the summary for r270814. Specifically, ensure we only attempt to lock and unlock the underlying archive file once.
For some reason I missed the `HandleToInputFile.count(..)` the first time I read this. It makes sense now.
https://reviews.llvm.org/D23721
More information about the llvm-commits
mailing list