mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-26 04:34:41 +00:00
Ensure that error messages a propagated from calls to LinkInModule so they get
reported to the end user. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41117 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3c1b4012b6
commit
af11dc00a0
@ -162,8 +162,9 @@ bool Linker::LinkInFile(const sys::Path &File, bool &is_native) {
|
||||
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 @@ bool Linker::LinkInFile(const sys::Path &File, bool &is_native) {
|
||||
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() + "'");
|
||||
|
Loading…
x
Reference in New Issue
Block a user