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
|
// FIXME: Should be parameterized to get the memory block associated with
|
||||||
// a particular loaded object.
|
// a particular loaded object.
|
||||||
sys::MemoryBlock getMemoryBlock();
|
sys::MemoryBlock getMemoryBlock();
|
||||||
|
StringRef getErrorString();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end namespace llvm
|
} // end namespace llvm
|
||||||
|
|
|
@ -334,4 +334,9 @@ sys::MemoryBlock RuntimeDyld::getMemoryBlock() {
|
||||||
return Dyld->getMemoryBlock();
|
return Dyld->getMemoryBlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StringRef RuntimeDyld::getErrorString()
|
||||||
|
{
|
||||||
|
return Dyld->getErrorString();
|
||||||
|
}
|
||||||
|
|
||||||
} // end namespace llvm
|
} // end namespace llvm
|
||||||
|
|
|
@ -63,8 +63,9 @@ static int executeInput() {
|
||||||
RuntimeDyld Dyld;
|
RuntimeDyld Dyld;
|
||||||
|
|
||||||
// Load the object file into it.
|
// Load the object file into it.
|
||||||
if (Dyld.loadObject(InputBuffer.take()))
|
if (Dyld.loadObject(InputBuffer.take())) {
|
||||||
return true;
|
return Error(Dyld.getErrorString());
|
||||||
|
}
|
||||||
|
|
||||||
// Get the address of "_main".
|
// Get the address of "_main".
|
||||||
void *MainAddress = Dyld.getSymbolAddress("_main");
|
void *MainAddress = Dyld.getSymbolAddress("_main");
|
||||||
|
|
Loading…
Reference in New Issue