mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
[ThinLTO] Expected<> return values need to be handled to avoid an assertion
llvm-svn: 291377
This commit is contained in:
parent
a0aefcef8e
commit
b603856b11
@ -196,8 +196,15 @@ crossImportIntoModule(Module &TheModule, const ModuleSummaryIndex &Index,
|
||||
};
|
||||
|
||||
FunctionImporter Importer(Index, Loader);
|
||||
if (!Importer.importFunctions(TheModule, ImportList))
|
||||
Expected<bool> Result = Importer.importFunctions(TheModule, ImportList);
|
||||
if (!Result) {
|
||||
handleAllErrors(Result.takeError(), [&](ErrorInfoBase &EIB) {
|
||||
SMDiagnostic Err = SMDiagnostic(TheModule.getModuleIdentifier(),
|
||||
SourceMgr::DK_Error, EIB.message());
|
||||
Err.print("ThinLTO", errs());
|
||||
});
|
||||
report_fatal_error("importFunctions failed");
|
||||
}
|
||||
}
|
||||
|
||||
static void optimizeModule(Module &TheModule, TargetMachine &TM,
|
||||
|
Loading…
x
Reference in New Issue
Block a user