[PATCH] D137768: [opt] Enable using -module-summary with -S

Alexander Shaposhnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 11 01:50:30 PST 2022


alexander-shaposhnikov added inline comments.


================
Comment at: llvm/lib/IR/IRPrintingPasses.cpp:56
+  if (Index) {
+    if (Index->modulePaths().empty())
+      Index->addModule("", 0);
----------------
tejohnson wrote:
> What is this case for?
without this we get the following output:
....
^0 = gv: (name: "_Z3Ackii", summaries: (function: (module: ^-1, flags: (linkage: external
....
(for simple invocations cat a.ll | opt  -S -o - ...)
it works,  but the assembler (llvm-as) rejects it ("error: expected module ID ..."), 
i thought it would be good to be able to run the full chain of conversions: opt | llvm-as | llvm-dis


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137768



More information about the llvm-commits mailing list