summaryrefslogtreecommitdiffstats
path: root/llvm/lib/LTO/LTO.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/LTO/LTO.cpp')
-rw-r--r--llvm/lib/LTO/LTO.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp
index ed95ac6598c..b599830d092 100644
--- a/llvm/lib/LTO/LTO.cpp
+++ b/llvm/lib/LTO/LTO.cpp
@@ -350,7 +350,8 @@ Error LTO::addRegularLTO(std::unique_ptr<InputFile> Input,
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;
OpenPOWER on IntegriCloud