vitalybuka added a comment. In https://reviews.llvm.org/D42995#1000155, @vitalybuka wrote:
> In https://reviews.llvm.org/D42995#1000025, @tejohnson wrote: > > > > Empty ThinLTOIndexFile signals that we don't need this module during > > > linking. > > > > Not the only case actually. We now also pass an empty index file when we > > want to compile the bitcode down to object without applying any LTO > > optimization (there are a few cases where we decide we want to turn off LTO > > optimizations for some links), and this is currently relying on being able > > to pass /dev/null for the index file that would be broken by this change. > > > I'd expect this should be done by indexing and content is already in the > merged object file. > Not sure how to reproduce this. I've build some large targets and I never > seen this. At least with gold I don't see how this possible. I see that thinlto.bc can be empty only if getSymbolsAndView returns nullptr or if LTOInfo for input object was false. Former means that we don't need this object and so I created this patch. For latter we already going to do the same anyway: https://reviews.llvm.org/D42680 https://reviews.llvm.org/D42995 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits