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
This commit is contained in:
Reid Spencer 2007-07-22 21:39:37 +00:00
parent c6402013c8
commit 858dd546bb

View File

@ -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) {