[llvm-commits] [llvm] r41117 - /llvm/trunk/lib/Linker/LinkItems.cpp
Reid Spencer
rspencer at reidspencer.com
Thu Aug 16 00:23:37 PDT 2007
Author: reid
Date: Thu Aug 16 02:23:37 2007
New Revision: 41117
URL: http://llvm.org/viewvc/llvm-project?rev=41117&view=rev
Log:
Ensure that error messages a propagated from calls to LinkInModule so they get
reported to the end user.
Modified:
llvm/trunk/lib/Linker/LinkItems.cpp
Modified: llvm/trunk/lib/Linker/LinkItems.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LinkItems.cpp?rev=41117&r1=41116&r2=41117&view=diff
==============================================================================
--- llvm/trunk/lib/Linker/LinkItems.cpp (original)
+++ llvm/trunk/lib/Linker/LinkItems.cpp Thu Aug 16 02:23:37 2007
@@ -162,8 +162,9 @@
if (MemoryBuffer *Buffer = MemoryBuffer::getSTDIN()) {
M.reset(ParseBitcodeFile(Buffer, &Error));
delete Buffer;
- if (!LinkInModule(M.get()))
- return false;
+ if (M.get())
+ if (!LinkInModule(M.get(), &Error))
+ return false;
} else
Error = "standard input is empty";
return error("Cannot link stdin: " + Error);
@@ -195,7 +196,7 @@
std::auto_ptr<Module> M(LoadObject(File));
if (M.get() == 0)
return error("Cannot load file '" + File.toString() + "'" + Error);
- if (LinkInModule(M.get()))
+ if (LinkInModule(M.get(), &Error))
return error("Cannot link file '" + File.toString() + "'" + Error);
verbose("Linked in file '" + File.toString() + "'");
More information about the llvm-commits
mailing list