[all-commits] [llvm/llvm-project] e54370: [NFC][ThinLTO] Let llvm::EmbedBitcodeInModule hand...

Mircea Trofin via All-commits all-commits at lists.llvm.org
Thu Sep 10 10:26:53 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e543708e5ea7af0ec3ef11d6fe932db507472aa1
      https://github.com/llvm/llvm-project/commit/e543708e5ea7af0ec3ef11d6fe932db507472aa1
  Author: Mircea Trofin <mtrofin at google.com>
  Date:   2020-09-10 (Thu, 10 Sep 2020)

  Changed paths:
    M llvm/include/llvm/Bitcode/BitcodeWriter.h
    M llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
    M llvm/lib/LTO/LTOBackend.cpp

  Log Message:
  -----------
  [NFC][ThinLTO] Let llvm::EmbedBitcodeInModule handle serialization.

llvm::EmbedBitcodeInModule handles serializing the passed-in module, if
the provided MemoryBufferRef is invalid. This is already the path taken
in one of the uses of the API - clang::EmbedBitcode, when called from
BackendConsumer::HandleTranslationUnit - so might as well do the same
here and reduce (by very little) code duplication.

The only difference this patch introduces is that the serialization happens
with ShouldPreserveUseListOrder set to true.

Differential Revision: https://reviews.llvm.org/D87339




More information about the All-commits mailing list