From 735ab4be35695df9f9da7ae8b584cec28eabf1fe Mon Sep 17 00:00:00 2001 From: Mircea Trofin Date: Tue, 27 Oct 2020 17:22:30 -0700 Subject: [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 --- llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp') 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 &CmdArgs) { // Save llvm.compiler.used and remove it. SmallVector 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 CmdData(const_cast(CmdArgs.data()), CmdArgs.size()); -- cgit v1.1