diff options
author | Mircea Trofin <mtrofin@google.com> | 2020-10-27 17:22:30 -0700 |
---|---|---|
committer | Mircea Trofin <mtrofin@google.com> | 2020-10-28 17:45:30 -0700 |
commit | 735ab4be35695df9f9da7ae8b584cec28eabf1fe (patch) | |
tree | d117b52023c90df2a57730d4e1f605adcc92de12 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | 77973f8dee6d4d6f1b7c2a026249c1f7068f267b (diff) | |
download | llvm-735ab4be35695df9f9da7ae8b584cec28eabf1fe.zip llvm-735ab4be35695df9f9da7ae8b584cec28eabf1fe.tar.gz llvm-735ab4be35695df9f9da7ae8b584cec28eabf1fe.tar.bz2 |
[ThinLTO] Fix .llvmcmd emission
llvm::EmbedBitcodeInModule needs (what used to be called) EmbedMarker
set, in order to emit .llvmcmd. EmbedMarker is really about embedding the
command line, so renamed the parameter accordingly, too.
This was not caught at test because the check-prefix was incorrect, but
FileCheck does not report that when multiple prefixes are provided. A
separate patch will address that.
Differential Revision: https://reviews.llvm.org/D90278
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index 02fa1ed..7dd38a1 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -4834,7 +4834,7 @@ static const char *getSectionNameForCommandline(const Triple &T) { } void llvm::EmbedBitcodeInModule(llvm::Module &M, llvm::MemoryBufferRef Buf, - bool EmbedBitcode, bool EmbedMarker, + bool EmbedBitcode, bool EmbedCmdline, const std::vector<uint8_t> &CmdArgs) { // Save llvm.compiler.used and remove it. SmallVector<Constant *, 2> UsedArray; @@ -4892,7 +4892,7 @@ void llvm::EmbedBitcodeInModule(llvm::Module &M, llvm::MemoryBufferRef Buf, } // Skip if only bitcode needs to be embedded. - if (EmbedMarker) { + if (EmbedCmdline) { // Embed command-line options. ArrayRef<uint8_t> CmdData(const_cast<uint8_t *>(CmdArgs.data()), CmdArgs.size()); |