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
This commit is contained in:
Jim Grosbach 2011-03-23 19:51:34 +00:00
parent 01079311e1
commit 8086f3b494

View 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() {