forked from OSchip/llvm-project
[MCJIT] Check if there have been errors during RuntimeDyld execution.
llvm-svn: 204837
This commit is contained in:
parent
6d6a2bba63
commit
6ff29a7b2f
|
@ -84,6 +84,7 @@ public:
|
||||||
|
|
||||||
void deregisterEHFrames();
|
void deregisterEHFrames();
|
||||||
|
|
||||||
|
bool hasError();
|
||||||
StringRef getErrorString();
|
StringRef getErrorString();
|
||||||
|
|
||||||
/// By default, only sections that are "required for execution" are passed to
|
/// By default, only sections that are "required for execution" are passed to
|
||||||
|
|
|
@ -115,7 +115,7 @@ bool MCJIT::removeModule(Module *M) {
|
||||||
|
|
||||||
void MCJIT::addObjectFile(object::ObjectFile *Obj) {
|
void MCJIT::addObjectFile(object::ObjectFile *Obj) {
|
||||||
ObjectImage *LoadedObject = Dyld.loadObject(Obj);
|
ObjectImage *LoadedObject = Dyld.loadObject(Obj);
|
||||||
if (!LoadedObject)
|
if (!LoadedObject || Dyld.hasError())
|
||||||
report_fatal_error(Dyld.getErrorString());
|
report_fatal_error(Dyld.getErrorString());
|
||||||
|
|
||||||
LoadedObjects.push_back(LoadedObject);
|
LoadedObjects.push_back(LoadedObject);
|
||||||
|
|
|
@ -761,6 +761,8 @@ void RuntimeDyld::mapSectionAddress(const void *LocalAddress,
|
||||||
Dyld->mapSectionAddress(LocalAddress, TargetAddress);
|
Dyld->mapSectionAddress(LocalAddress, TargetAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool RuntimeDyld::hasError() { return Dyld->hasError(); }
|
||||||
|
|
||||||
StringRef RuntimeDyld::getErrorString() { return Dyld->getErrorString(); }
|
StringRef RuntimeDyld::getErrorString() { return Dyld->getErrorString(); }
|
||||||
|
|
||||||
void RuntimeDyld::registerEHFrames() {
|
void RuntimeDyld::registerEHFrames() {
|
||||||
|
|
Loading…
Reference in New Issue