diff options
author | Teresa Johnson <tejohnson@google.com> | 2015-11-02 21:39:10 +0000 |
---|---|---|
committer | Teresa Johnson <tejohnson@google.com> | 2015-11-02 21:39:10 +0000 |
commit | b1d4a39990f0abcd323cdb5631f46101d3e4e867 (patch) | |
tree | 664ce694467bfff09d982164948f39539853582b /llvm/lib/Object/FunctionIndexObjectFile.cpp | |
parent | def501d1cade2b8cd1e1c26b4971abf93ffac9a3 (diff) | |
download | bcm5719-llvm-b1d4a39990f0abcd323cdb5631f46101d3e4e867.tar.gz bcm5719-llvm-b1d4a39990f0abcd323cdb5631f46101d3e4e867.zip |
Support for ThinLTO function importing and symbol linking.
Summary:
Support for necessary linkage changes and symbol renaming during
ThinLTO function importing.
Also includes llvm-link support for manually importing functions
and associated llvm-link based tests.
Note that this does not include support for intelligently importing
metadata, which is currently imported duplicate times. That support will
be in the follow-on patch, and currently is ignored by the tests.
Reviewers: dexonsmith, joker.eph, davidxl
Subscribers: tobiasvk, tejohnson, llvm-commits
Differential Revision: http://reviews.llvm.org/D13515
llvm-svn: 251837
Diffstat (limited to 'llvm/lib/Object/FunctionIndexObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/FunctionIndexObjectFile.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Object/FunctionIndexObjectFile.cpp b/llvm/lib/Object/FunctionIndexObjectFile.cpp index b1e8ebc657c..ee65990c528 100644 --- a/llvm/lib/Object/FunctionIndexObjectFile.cpp +++ b/llvm/lib/Object/FunctionIndexObjectFile.cpp @@ -1,5 +1,4 @@ -//===- FunctionIndexObjectFile.cpp - Function index file implementation -//----===// +//===- FunctionIndexObjectFile.cpp - Function index file implementation ---===// // // The LLVM Compiler Infrastructure // @@ -86,15 +85,15 @@ bool FunctionIndexObjectFile::hasFunctionSummaryInMemBuffer( // function summary/index. ErrorOr<std::unique_ptr<FunctionIndexObjectFile>> FunctionIndexObjectFile::create(MemoryBufferRef Object, LLVMContext &Context, - bool IsLazy) { + const Module *ExportingModule, bool IsLazy) { std::unique_ptr<FunctionInfoIndex> Index; ErrorOr<MemoryBufferRef> BCOrErr = findBitcodeInMemBuffer(Object); if (!BCOrErr) return BCOrErr.getError(); - ErrorOr<std::unique_ptr<FunctionInfoIndex>> IOrErr = - getFunctionInfoIndex(BCOrErr.get(), Context, nullptr, IsLazy); + ErrorOr<std::unique_ptr<FunctionInfoIndex>> IOrErr = getFunctionInfoIndex( + BCOrErr.get(), Context, nullptr, ExportingModule, IsLazy); if (std::error_code EC = IOrErr.getError()) return EC; |