diff options
author | Mircea Trofin <mtrofin@google.com> | 2020-09-16 12:08:15 -0700 |
---|---|---|
committer | Mircea Trofin <mtrofin@google.com> | 2020-09-22 13:12:11 -0700 |
commit | cf112382ddd0d717edf0b8a3e5b061de925258e9 (patch) | |
tree | 78bc2aa17895f85a280087a575f706a6b5fd348c /clang/lib/CodeGen/CodeGenAction.cpp | |
parent | c45596147938191b0ffde91ee8d506e315bf4c8f (diff) | |
download | llvm-cf112382ddd0d717edf0b8a3e5b061de925258e9.zip llvm-cf112382ddd0d717edf0b8a3e5b061de925258e9.tar.gz llvm-cf112382ddd0d717edf0b8a3e5b061de925258e9.tar.bz2 |
[ThinLTO] Option to bypass function importing.
This completes the circle, complementing -lto-embed-bitcode
(specifically, post-merge-pre-opt). Using -thinlto-assume-merged skips
function importing. The index file is still needed for the other data it
contains.
Differential Revision: https://reviews.llvm.org/D87949
Diffstat (limited to 'clang/lib/CodeGen/CodeGenAction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenAction.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp index eda4bef..5ea2fc2 100644 --- a/clang/lib/CodeGen/CodeGenAction.cpp +++ b/clang/lib/CodeGen/CodeGenAction.cpp @@ -35,6 +35,7 @@ #include "llvm/IR/LLVMRemarkStreamer.h" #include "llvm/IR/Module.h" #include "llvm/IRReader/IRReader.h" +#include "llvm/LTO/LTOBackend.h" #include "llvm/Linker/Linker.h" #include "llvm/Pass.h" #include "llvm/Support/MemoryBuffer.h" @@ -1066,7 +1067,7 @@ CodeGenAction::loadModule(MemoryBufferRef MBRef) { Expected<std::vector<BitcodeModule>> BMsOrErr = getBitcodeModuleList(MBRef); if (!BMsOrErr) return DiagErrors(BMsOrErr.takeError()); - BitcodeModule *Bm = FindThinLTOModule(*BMsOrErr); + BitcodeModule *Bm = llvm::lto::findThinLTOModule(*BMsOrErr); // We have nothing to do if the file contains no ThinLTO module. This is // possible if ThinLTO compilation was not able to split module. Content of // the file was already processed by indexing and will be passed to the |