[PATCH] D87336: [NFC][ThinLTO] EmbedBitcodeSection doesn't need the Config
Mircea Trofin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 8 16:54:58 PDT 2020
mtrofin updated this revision to Diff 290611.
mtrofin added a comment.
feedback
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87336/new/
https://reviews.llvm.org/D87336
Files:
llvm/lib/LTO/LTOBackend.cpp
Index: llvm/lib/LTO/LTOBackend.cpp
===================================================================
--- llvm/lib/LTO/LTOBackend.cpp
+++ llvm/lib/LTO/LTOBackend.cpp
@@ -350,7 +350,7 @@
"lto-embed-bitcode", cl::init(false),
cl::desc("Embed LLVM bitcode in object files produced by LTO"));
-static void EmitBitcodeSection(Module &M, const Config &Conf) {
+static void EmitBitcodeSection(Module &M) {
if (!EmbedBitcode)
return;
SmallVector<char, 0> Buffer;
@@ -359,7 +359,7 @@
std::unique_ptr<MemoryBuffer> Buf(
new SmallVectorMemoryBuffer(std::move(Buffer)));
- llvm::EmbedBitcodeInModule(M, Buf->getMemBufferRef(), /*EmbedBitcode*/ true,
+ llvm::EmbedBitcodeInModule(M, llvm::MemoryBufferRef(), /*EmbedBitcode*/ true,
/*EmbedMarker*/ false, /*CmdArgs*/ nullptr);
}
@@ -369,7 +369,7 @@
if (Conf.PreCodeGenModuleHook && !Conf.PreCodeGenModuleHook(Task, Mod))
return;
- EmitBitcodeSection(Mod, Conf);
+ EmitBitcodeSection(Mod);
std::unique_ptr<ToolOutputFile> DwoOut;
SmallString<1024> DwoFile(Conf.SplitDwarfOutput);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87336.290611.patch
Type: text/x-patch
Size: 1106 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200908/2503178e/attachment.bin>
More information about the llvm-commits
mailing list