aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/LTO/LTOBackend.cpp
diff options
context:
space:
mode:
authorMircea Trofin <mtrofin@google.com>2020-10-27 17:22:30 -0700
committerMircea Trofin <mtrofin@google.com>2020-10-28 17:45:30 -0700
commit735ab4be35695df9f9da7ae8b584cec28eabf1fe (patch)
treed117b52023c90df2a57730d4e1f605adcc92de12 /llvm/lib/LTO/LTOBackend.cpp
parent77973f8dee6d4d6f1b7c2a026249c1f7068f267b (diff)
downloadllvm-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/LTO/LTOBackend.cpp')
-rw-r--r--llvm/lib/LTO/LTOBackend.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp
index f4da6d8..7f437a2 100644
--- a/llvm/lib/LTO/LTOBackend.cpp
+++ b/llvm/lib/LTO/LTOBackend.cpp
@@ -373,8 +373,7 @@ bool opt(const Config &Conf, TargetMachine *TM, unsigned Task, Module &Mod,
dbgs() << "Post-(Thin)LTO merge bitcode embedding was requested, but "
"command line arguments are not available");
llvm::EmbedBitcodeInModule(Mod, llvm::MemoryBufferRef(),
- /*EmbedBitcode*/ true,
- /*EmbedMarker*/ false,
+ /*EmbedBitcode*/ true, /*EmbedCmdline*/ true,
/*Cmdline*/ CmdArgs);
}
// FIXME: Plumb the combined index into the new pass manager.
@@ -398,7 +397,7 @@ void codegen(const Config &Conf, TargetMachine *TM, AddStreamFn AddStream,
if (EmbedBitcode == LTOBitcodeEmbedding::EmbedOptimized)
llvm::EmbedBitcodeInModule(Mod, llvm::MemoryBufferRef(),
/*EmbedBitcode*/ true,
- /*EmbedMarker*/ false,
+ /*EmbedCmdline*/ false,
/*CmdArgs*/ std::vector<uint8_t>());
std::unique_ptr<ToolOutputFile> DwoOut;