[PATCH] D46480: Update ThinLTO Indexing logic

Rumeet Dhindsa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 7 11:40:50 PDT 2018


rdhindsa marked an inline comment as done.
rdhindsa added inline comments.


================
Comment at: lld/ELF/LTO.cpp:300
+    if (Config->SaveTemps)
+      saveBuffer(Buff[0], Config->OutputFile + ".lto.o");
+    exit(0);
----------------
pcc wrote:
> tejohnson wrote:
> > There won't always be a regular LTO file created via splitting for ThinLTO builds, so Buff[0] should be empty some of the time. Do you have a test for this case?
> > 
> > The other thing being done by the loop below is a call to createObjectFile, does that need to be done for Buff[0] if non-empty too?
> Buff[0] should always be non-empty, see D41267.
I have added the test as well to ensure that one file is generated in this case. We just need to save this file and, we don't need to call createObjectFile, since we exit from LLD just after this step.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D46480





More information about the llvm-commits mailing list