[PATCH] D146776: [llvm] Preliminary fat-lto-objects support
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 9 16:34:37 PDT 2023
tejohnson accepted this revision.
tejohnson added a comment.
LGTM with a couple of minor nits and a question back to @nikic about one of this comments.
================
Comment at: llvm/lib/Bitcode/Writer/EmbedBitcodePass.cpp:30
+ if (M.getGlobalVariable("llvm.embedded.module", true))
+ report_fatal_error("Can only embed the module once.");
+
----------------
nikic wrote:
> You can pass `true` to suppress the crash, as this is user error, not a compiler error.
true seems to be the default, did you mean false? The same could probably be said for the later call to report_fatal_error (ELF format). I actually think this one seems less like a user error and more like a compiler error (if this pass gets run twice somehow).
================
Comment at: llvm/lib/Bitcode/Writer/EmbedBitcodePass.cpp:49
+ if (IsThinLTO)
+ ThinLTOBitcodeWriterPass(OS, nullptr).run(*NewModule, AM);
+ else
----------------
Document constant parameter (nullptr)
================
Comment at: llvm/test/Bitcode/embed.ll:15
+
+;; Make sue the metadata correlates to the .llvm.lto section
+; CHECK: !llvm.embedded.objects = !{!1}
----------------
s/sue/sure
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146776/new/
https://reviews.llvm.org/D146776
More information about the llvm-commits
mailing list