[llvm] r204837 - [MCJIT] Check if there have been errors during RuntimeDyld execution.
Juergen Ributzka
juergen at apple.com
Wed Mar 26 11:19:27 PDT 2014
Author: ributzka
Date: Wed Mar 26 13:19:27 2014
New Revision: 204837
URL: http://llvm.org/viewvc/llvm-project?rev=204837&view=rev
Log:
[MCJIT] Check if there have been errors during RuntimeDyld execution.
Modified:
llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h
llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.cpp
llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
Modified: llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h?rev=204837&r1=204836&r2=204837&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h (original)
+++ llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h Wed Mar 26 13:19:27 2014
@@ -84,6 +84,7 @@ public:
void deregisterEHFrames();
+ bool hasError();
StringRef getErrorString();
/// By default, only sections that are "required for execution" are passed to
Modified: llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.cpp?rev=204837&r1=204836&r2=204837&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/MCJIT/MCJIT.cpp Wed Mar 26 13:19:27 2014
@@ -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);
Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp?rev=204837&r1=204836&r2=204837&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp Wed Mar 26 13:19:27 2014
@@ -761,6 +761,8 @@ void RuntimeDyld::mapSectionAddress(cons
Dyld->mapSectionAddress(LocalAddress, TargetAddress);
}
+bool RuntimeDyld::hasError() { return Dyld->hasError(); }
+
StringRef RuntimeDyld::getErrorString() { return Dyld->getErrorString(); }
void RuntimeDyld::registerEHFrames() {
More information about the llvm-commits
mailing list