[PATCH] D87339: [NFC][ThinLTO] Let llvm::EmbedBitcodeInModule handle serialization.
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 10 09:56:12 PDT 2020
tejohnson accepted this revision.
tejohnson added a comment.
This revision is now accepted and ready to land.
LGTM with comment updates as suggested below.
================
Comment at: llvm/include/llvm/Bitcode/BitcodeWriter.h:159
+ /// will be handled by this API. The same behavior happens if the provided Buf
+ /// is not valid bitcode.
void EmbedBitcodeInModule(Module &M, MemoryBufferRef Buf, bool EmbedBitcode,
----------------
maybe make this something like "...if the provided Buf is not bitcode (e.g. is LLVM assembly)" since that seems to be what it is trying to handle
================
Comment at: llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:4839
(const unsigned char *)Buf.getBufferEnd())) {
// If the input is LLVM Assembly, bitcode is produced by serializing
// the module. Use-lists order need to be preserved in this case.
----------------
Update comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87339/new/
https://reviews.llvm.org/D87339
More information about the llvm-commits
mailing list