[llvm-commits] [llvm] r128094 - in /llvm/trunk: include/llvm/ExecutionEngine/RuntimeDyld.h lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp tools/llvm-rtdyld/llvm-rtdyld.cpp
Jim Grosbach
grosbach at apple.com
Tue Mar 22 11:19:42 PDT 2011
Author: grosbach
Date: Tue Mar 22 13:19:42 2011
New Revision: 128094
URL: http://llvm.org/viewvc/llvm-project?rev=128094&view=rev
Log:
Propogate the error message, not just the error state.
Modified:
llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h
llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
llvm/trunk/tools/llvm-rtdyld/llvm-rtdyld.cpp
Modified: llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h?rev=128094&r1=128093&r2=128094&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h (original)
+++ llvm/trunk/include/llvm/ExecutionEngine/RuntimeDyld.h Tue Mar 22 13:19:42 2011
@@ -38,6 +38,7 @@
// FIXME: Should be parameterized to get the memory block associated with
// a particular loaded object.
sys::MemoryBlock getMemoryBlock();
+ StringRef getErrorString();
};
} // end namespace llvm
Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp?rev=128094&r1=128093&r2=128094&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp Tue Mar 22 13:19:42 2011
@@ -334,4 +334,9 @@
return Dyld->getMemoryBlock();
}
+StringRef RuntimeDyld::getErrorString()
+{
+ return Dyld->getErrorString();
+}
+
} // end namespace llvm
Modified: llvm/trunk/tools/llvm-rtdyld/llvm-rtdyld.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-rtdyld/llvm-rtdyld.cpp?rev=128094&r1=128093&r2=128094&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-rtdyld/llvm-rtdyld.cpp (original)
+++ llvm/trunk/tools/llvm-rtdyld/llvm-rtdyld.cpp Tue Mar 22 13:19:42 2011
@@ -63,8 +63,9 @@
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");
More information about the llvm-commits
mailing list