[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 17:11:37 PDT 2020


mtrofin marked an inline comment as done.
mtrofin added inline comments.


================
Comment at: llvm/lib/LTO/LTOBackend.cpp:362
       new SmallVectorMemoryBuffer(std::move(Buffer)));
-  llvm::EmbedBitcodeInModule(M, Buf->getMemBufferRef(), /*EmbedBitcode*/ true,
+  llvm::EmbedBitcodeInModule(M, llvm::MemoryBufferRef(), /*EmbedBitcode*/ true,
                              /*EmbedMarker*/ false, /*CmdArgs*/ nullptr);
----------------
tejohnson wrote:
> Why this change? Now Buf is unused.
Oh - fixed. I was going to do that next and forgot to undo the change. Turns out, llvm::EmbedBitcodeInModule handles that case - i.e. if you pass an invalid memory buffer, it will extract it from the provided Module. Separate change, in any case.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87336/new/

https://reviews.llvm.org/D87336



More information about the llvm-commits mailing list