forked from OSchip/llvm-project
Propogate the error message, not just the error state.
llvm-svn: 128094
This commit is contained in:
parent
d52744086f
commit
40411cc409
|
@ -38,6 +38,7 @@ public:
|
|||
// FIXME: Should be parameterized to get the memory block associated with
|
||||
// a particular loaded object.
|
||||
sys::MemoryBlock getMemoryBlock();
|
||||
StringRef getErrorString();
|
||||
};
|
||||
|
||||
} // end namespace llvm
|
||||
|
|
|
@ -334,4 +334,9 @@ sys::MemoryBlock RuntimeDyld::getMemoryBlock() {
|
|||
return Dyld->getMemoryBlock();
|
||||
}
|
||||
|
||||
StringRef RuntimeDyld::getErrorString()
|
||||
{
|
||||
return Dyld->getErrorString();
|
||||
}
|
||||
|
||||
} // end namespace llvm
|
||||
|
|
|
@ -63,8 +63,9 @@ static int executeInput() {
|
|||
RuntimeDyld Dyld;
|
||||
|
||||
// Load the object file into it.
|
||||
if (Dyld.loadObject(InputBuffer.take()))
|
||||
return true;
|
||||
if (Dyld.loadObject(InputBuffer.take())) {
|
||||
return Error(Dyld.getErrorString());
|
||||
}
|
||||
|
||||
// Get the address of "_main".
|
||||
void *MainAddress = Dyld.getSymbolAddress("_main");
|
||||
|
|
Loading…
Reference in New Issue