Make sure to report any errors from the runtime dyld.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128160 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/ExecutionEngine/MCJIT/MCJIT.cpp b/lib/ExecutionEngine/MCJIT/MCJIT.cpp
index 854bd1f..faed7a6 100644
--- a/lib/ExecutionEngine/MCJIT/MCJIT.cpp
+++ b/lib/ExecutionEngine/MCJIT/MCJIT.cpp
@@ -90,7 +90,8 @@
   // FIXME: It would be nice to avoid making yet another copy.
   MemoryBuffer *MB = MemoryBuffer::getMemBufferCopy(StringRef(Buffer.data(),
                                                               Buffer.size()));
-  Dyld.loadObject(MB);
+  if (Dyld.loadObject(MB))
+    report_fatal_error(Dyld.getErrorString());
 }
 
 MCJIT::~MCJIT() {