aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Linker
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-07-22 21:39:37 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-07-22 21:39:37 +0000
commit858dd546bb48542f4568cd8f5530388a7b9a3d62 (patch)
tree04891b8b150720cb37a6b08599c31858a51ae82a /lib/Linker
parentc6402013c8767d5718d4c7ae5625969361182771 (diff)
downloadexternal_llvm-858dd546bb48542f4568cd8f5530388a7b9a3d62.zip
external_llvm-858dd546bb48542f4568cd8f5530388a7b9a3d62.tar.gz
external_llvm-858dd546bb48542f4568cd8f5530388a7b9a3d62.tar.bz2
Report an error if one occurs in releaseModule.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40405 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Linker')
-rw-r--r--lib/Linker/LinkArchives.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Linker/LinkArchives.cpp b/lib/Linker/LinkArchives.cpp
index 381d0e7..f25df88 100644
--- a/lib/Linker/LinkArchives.cpp
+++ b/lib/Linker/LinkArchives.cpp
@@ -159,6 +159,9 @@ Linker::LinkInArchive(const sys::Path &Filename, bool &is_native) {
// Get the module we must link in.
std::string moduleErrorMsg;
std::auto_ptr<Module> AutoModule((*I)->releaseModule( &moduleErrorMsg ));
+ if (!moduleErrorMsg.empty())
+ return error("Could not load a module: " + moduleErrorMsg);
+
Module* aModule = AutoModule.get();
if (aModule != NULL) {