summaryrefslogtreecommitdiff
path: root/tools/llvm-rtdyld
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2011-03-22 18:19:42 +0000
committerJim Grosbach <grosbach@apple.com>2011-03-22 18:19:42 +0000
commitb3eecaf19e81f0cccffdeff940afbfd1a3754af2 (patch)
treea73600d4becc2ade7dd44aade0a0020eb06685c3 /tools/llvm-rtdyld
parent34714a06096f854c76371295d8c20b017fbba50b (diff)
downloadllvm-b3eecaf19e81f0cccffdeff940afbfd1a3754af2.tar.gz
llvm-b3eecaf19e81f0cccffdeff940afbfd1a3754af2.tar.bz2
llvm-b3eecaf19e81f0cccffdeff940afbfd1a3754af2.tar.xz
Propogate the error message, not just the error state.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128094 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-rtdyld')
-rw-r--r--tools/llvm-rtdyld/llvm-rtdyld.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/llvm-rtdyld/llvm-rtdyld.cpp b/tools/llvm-rtdyld/llvm-rtdyld.cpp
index 4e224261cb..286a3f251d 100644
--- a/tools/llvm-rtdyld/llvm-rtdyld.cpp
+++ b/tools/llvm-rtdyld/llvm-rtdyld.cpp
@@ -63,8 +63,9 @@ static int executeInput() {
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");