From 858dd546bb48542f4568cd8f5530388a7b9a3d62 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Sun, 22 Jul 2007 21:39:37 +0000 Subject: 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 --- lib/Linker/LinkArchives.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/Linker/LinkArchives.cpp') 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 AutoModule((*I)->releaseModule( &moduleErrorMsg )); + if (!moduleErrorMsg.empty()) + return error("Could not load a module: " + moduleErrorMsg); + Module* aModule = AutoModule.get(); if (aModule != NULL) { -- cgit v1.1