Propogate the error message, not just the error state.
[oota-llvm.git] / tools / llvm-rtdyld / llvm-rtdyld.cpp
index 4e224261cbffdfe2bafc677ec2d0f6d5215acf78..286a3f251d8deba1fefaf96144f2c5eeabab0665 100644 (file)
@@ -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");