[MCJIT] Check if there have been errors during RuntimeDyld execution.

llvm-svn: 204837
This commit is contained in:
Juergen Ributzka 2014-03-26 18:19:27 +00:00
parent 03c9c331b6
commit fceb0e48f5
3 changed files with 4 additions and 1 deletions

View File

@ -84,6 +84,7 @@ public:
void deregisterEHFrames();
bool hasError();
StringRef getErrorString();
/// By default, only sections that are "required for execution" are passed to

View File

@ -115,7 +115,7 @@ bool MCJIT::removeModule(Module *M) {
void MCJIT::addObjectFile(object::ObjectFile *Obj) {
ObjectImage *LoadedObject = Dyld.loadObject(Obj);
if (!LoadedObject)
if (!LoadedObject || Dyld.hasError())
report_fatal_error(Dyld.getErrorString());
LoadedObjects.push_back(LoadedObject);

View File

@ -761,6 +761,8 @@ void RuntimeDyld::mapSectionAddress(const void *LocalAddress,
Dyld->mapSectionAddress(LocalAddress, TargetAddress);
}
bool RuntimeDyld::hasError() { return Dyld->hasError(); }
StringRef RuntimeDyld::getErrorString() { return Dyld->getErrorString(); }
void RuntimeDyld::registerEHFrames() {