[PATCH] D46608: Add support for ThinLTO plugin option thinlto-object-suffix-replace

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 10 11:21:41 PDT 2018


ruiu added inline comments.


================
Comment at: lld/ELF/InputFiles.cpp:1030-1033
+  if (Config->ThinLTOIndexOnly) {
+    Path.consume_back(Config->ThinLTOObjectSuffixReplace.first.str());
+    UpdatedPath = Path.str() + Config->ThinLTOObjectSuffixReplace.second.str();
+  }
----------------
rdhindsa wrote:
> ruiu wrote:
> > All tests including the new one you are adding in this patch seem to pass without these four lines of code. Is this needed?
> Yeah it is needed as this handles all the bitcode files except lazyobjfiles. I verified that the test thinlto-object-suffix-replace fails without these changes.
Yeah, I verified that your test would fail without this piece of code. But it doesn't feel right to add a new piece of this common path just for a minor ThinLTO feature. That seems too intrusive to me. It might be unavoidable, but we probably shouldn't do this. Let me actually modify this code.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D46608





More information about the llvm-commits mailing list