[llvm-commits] [llvm] r40405 - /llvm/trunk/lib/Linker/LinkArchives.cpp
Reid Spencer
rspencer at reidspencer.com
Sun Jul 22 14:39:38 PDT 2007
Author: reid
Date: Sun Jul 22 16:39:37 2007
New Revision: 40405
URL: http://llvm.org/viewvc/llvm-project?rev=40405&view=rev
Log:
Report an error if one occurs in releaseModule.
Modified:
llvm/trunk/lib/Linker/LinkArchives.cpp
Modified: llvm/trunk/lib/Linker/LinkArchives.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LinkArchives.cpp?rev=40405&r1=40404&r2=40405&view=diff
==============================================================================
--- llvm/trunk/lib/Linker/LinkArchives.cpp (original)
+++ llvm/trunk/lib/Linker/LinkArchives.cpp Sun Jul 22 16:39:37 2007
@@ -159,6 +159,9 @@
// 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) {
More information about the llvm-commits
mailing list