Changeset View
Changeset View
Standalone View
Standalone View
lib/Transforms/IPO/FunctionImport.cpp
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | static std::unique_ptr<Module> loadFile(const std::string &FileName, | ||||
DEBUG(dbgs() << "Loading '" << FileName << "'\n"); | DEBUG(dbgs() << "Loading '" << FileName << "'\n"); | ||||
// Metadata isn't loaded until functions are imported, to minimize | // Metadata isn't loaded until functions are imported, to minimize | ||||
// the memory overhead. | // the memory overhead. | ||||
std::unique_ptr<Module> Result = | std::unique_ptr<Module> Result = | ||||
getLazyIRFileModule(FileName, Err, Context, | getLazyIRFileModule(FileName, Err, Context, | ||||
/* ShouldLazyLoadMetadata = */ true); | /* ShouldLazyLoadMetadata = */ true); | ||||
if (!Result) { | if (!Result) { | ||||
Err.print("function-import", errs()); | Err.print("function-import", errs()); | ||||
return nullptr; | report_fatal_error("Abort"); | ||||
} | } | ||||
return Result; | return Result; | ||||
} | } | ||||
namespace { | namespace { | ||||
/// Given a list of possible callee implementation for a call site, select one | /// Given a list of possible callee implementation for a call site, select one | ||||
▲ Show 20 Lines • Show All 413 Lines • Show Last 20 Lines |