Do not require a Context to extract the FunctionIndex from Bitcode (NFC)
[oota-llvm.git] / tools / llvm-link / llvm-link.cpp
index 8d0ce0a040f9e03e690516977167286147ca019b..c539f75702bed1fae1a0f91e9de81682fa7db397 100644 (file)
@@ -148,7 +148,7 @@ loadIndex(LLVMContext &Context, const Module *ExportingModule = nullptr) {
     return EC;
   MemoryBufferRef BufferRef = (FileOrErr.get())->getMemBufferRef();
   ErrorOr<std::unique_ptr<object::FunctionIndexObjectFile>> ObjOrErr =
-      object::FunctionIndexObjectFile::create(BufferRef, Context,
+      object::FunctionIndexObjectFile::create(BufferRef, diagnosticHandler,
                                               ExportingModule);
   EC = ObjOrErr.getError();
   if (EC)