mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-27 15:29:51 +00:00
Propogate the error message, not just the error state.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128094 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
34714a0609
commit
b3eecaf19e
@ -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
Block a user