[PATCH] D60226: [ThinLTO] Fix ThinLTOCodegenerator to export llvm.used symbols

Steven Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 5 12:53:56 PDT 2019


steven_wu marked 2 inline comments as done.
steven_wu added inline comments.


================
Comment at: llvm/tools/llvm-lto/llvm-lto.cpp:458
 
-  if (ThinLTOModuleId.getNumOccurrences()) {
-    if (InputFilenames.size() != 1)
-      report_fatal_error("Can't override the module id for multiple files");
-    M->setModuleIdentifier(ThinLTOModuleId);
+static std::unique_ptr<lto::InputFile> loadInputFile(MemoryBufferRef Buffer) {
+  ExitOnError ExitOnErr("llvm-lto: error loading input '" +
----------------
tejohnson wrote:
> Maybe combine this with loadFile, since they are always used together and the Buffer from loadFile doesn't seem to be used elsewhere?
This is just to extend the lifetime of buffer till module is created from InputFile. 


================
Comment at: llvm/tools/llvm-lto/llvm-lto.cpp:462
 
-  if (ThinLTOModuleId.getNumOccurrences()) {
-    if (InputFilenames.size() != 1)
----------------
tejohnson wrote:
> The new patch loses this option, which seems to be used by a couple tests under test/ThinLTO/X86.
I will add this back.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60226/new/

https://reviews.llvm.org/D60226





More information about the llvm-commits mailing list