Support for ThinLTO function importing and symbol linking.
[oota-llvm.git] / lib / Object / FunctionIndexObjectFile.cpp
index b1e8ebc657cdf3e4a277e202d22e2640237fcc14..ee65990c528eee34367716ffe2035486b74701ac 100644 (file)
@@ -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;