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
diff --git a/tools/llvm-rtdyld/llvm-rtdyld.cpp b/tools/llvm-rtdyld/llvm-rtdyld.cpp
index 4e22426..286a3f2 100644
--- a/tools/llvm-rtdyld/llvm-rtdyld.cpp
+++ b/tools/llvm-rtdyld/llvm-rtdyld.cpp
@@ -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");