From b1d4a39990f0abcd323cdb5631f46101d3e4e867 Mon Sep 17 00:00:00 2001 From: Teresa Johnson Date: Mon, 2 Nov 2015 21:39:10 +0000 Subject: 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 --- llvm/lib/Object/FunctionIndexObjectFile.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'llvm/lib/Object/FunctionIndexObjectFile.cpp') 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> FunctionIndexObjectFile::create(MemoryBufferRef Object, LLVMContext &Context, - bool IsLazy) { + const Module *ExportingModule, bool IsLazy) { std::unique_ptr Index; ErrorOr BCOrErr = findBitcodeInMemBuffer(Object); if (!BCOrErr) return BCOrErr.getError(); - ErrorOr> IOrErr = - getFunctionInfoIndex(BCOrErr.get(), Context, nullptr, IsLazy); + ErrorOr> IOrErr = getFunctionInfoIndex( + BCOrErr.get(), Context, nullptr, ExportingModule, IsLazy); if (std::error_code EC = IOrErr.getError()) return EC; -- cgit v1.2.3