Make sure to report any errors from the runtime dyld.
authorJim Grosbach <grosbach@apple.com>
Wed, 23 Mar 2011 19:51:34 +0000 (19:51 +0000)
committerJim Grosbach <grosbach@apple.com>
Wed, 23 Mar 2011 19:51:34 +0000 (19:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128160 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/MCJIT/MCJIT.cpp

index 854bd1f06934be958c09425afb5396f621af1404..faed7a6ae45b42ccf119d2f8cd1e56871ed93f06 100644 (file)
@@ -90,7 +90,8 @@ MCJIT::MCJIT(Module *m, TargetMachine *tm, TargetJITInfo &tji,
   // 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() {