Restore "Support for ThinLTO function importing and symbol linking."
This restores commit r251837, with the new library dependence added to llvm-link/Makefile to address bot failures. llvm-svn: 251866
This commit is contained in:
@@ -5813,12 +5813,12 @@ llvm::getBitcodeTargetTriple(MemoryBufferRef Buffer, LLVMContext &Context,
|
||||
ErrorOr<std::unique_ptr<FunctionInfoIndex>>
|
||||
llvm::getFunctionInfoIndex(MemoryBufferRef Buffer, LLVMContext &Context,
|
||||
DiagnosticHandlerFunction DiagnosticHandler,
|
||||
bool IsLazy) {
|
||||
const Module *ExportingModule, bool IsLazy) {
|
||||
std::unique_ptr<MemoryBuffer> Buf = MemoryBuffer::getMemBuffer(Buffer, false);
|
||||
FunctionIndexBitcodeReader R(Buf.get(), Context, DiagnosticHandler, IsLazy);
|
||||
|
||||
std::unique_ptr<FunctionInfoIndex> Index =
|
||||
llvm::make_unique<FunctionInfoIndex>();
|
||||
llvm::make_unique<FunctionInfoIndex>(ExportingModule);
|
||||
|
||||
auto cleanupOnError = [&](std::error_code EC) {
|
||||
R.releaseBuffer(); // Never take ownership on error.
|
||||
|
||||
Reference in New Issue
Block a user