Change ModuleLinker to take a set of GlobalValues to import instead of a single one
For efficiency reason, when importing multiple functions for the same Module, we can avoid reparsing it every time. Differential Revision: http://reviews.llvm.org/D15102 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 254486
This commit is contained in:
@@ -198,7 +198,10 @@ static bool importFunctions(const char *argv0, LLVMContext &Context,
|
||||
}
|
||||
|
||||
// Link in the specified function.
|
||||
if (L.linkInModule(*M, Linker::Flags::None, Index.get(), F))
|
||||
DenseSet<const GlobalValue *> FunctionToImport;
|
||||
FunctionToImport.insert(F);
|
||||
if (L.linkInModule(*M, Linker::Flags::None, Index.get(),
|
||||
&FunctionToImport))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user