Bitcode: Change the materializer interface to return llvm::Error.

Differential Revision: https://reviews.llvm.org/D26439

llvm-svn: 286382
This commit is contained in:
Peter Collingbourne
2016-11-09 17:49:19 +00:00
parent 9934c54cca
commit 7f00d0a125
19 changed files with 112 additions and 103 deletions

View File

@@ -359,7 +359,8 @@ Error lto::thinBackend(Config &Conf, unsigned Task, AddStreamFn AddStream,
};
FunctionImporter Importer(CombinedIndex, ModuleLoader);
Importer.importFunctions(Mod, ImportList);
if (Error Err = Importer.importFunctions(Mod, ImportList).takeError())
return Err;
if (Conf.PostImportModuleHook && !Conf.PostImportModuleHook(Task, Mod))
return Error();