Bitcode: Change the materializer interface to return llvm::Error.
Differential Revision: https://reviews.llvm.org/D26439
llvm-svn: 286382
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp
index ed95ac6..b599830 100644
--- a/llvm/lib/LTO/LTO.cpp
+++ b/llvm/lib/LTO/LTO.cpp
@@ -350,7 +350,8 @@
std::unique_ptr<object::IRObjectFile> Obj = std::move(*ObjOrErr);
Module &M = Obj->getModule();
- M.materializeMetadata();
+ if (Error Err = M.materializeMetadata())
+ return Err;
UpgradeDebugInfo(M);
SmallPtrSet<GlobalValue *, 8> Used;