git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128094
91177308-0d34-0410-b5e6-
96231b3b80d8
// FIXME: Should be parameterized to get the memory block associated with
// a particular loaded object.
sys::MemoryBlock getMemoryBlock();
// FIXME: Should be parameterized to get the memory block associated with
// a particular loaded object.
sys::MemoryBlock getMemoryBlock();
+ StringRef getErrorString();
};
} // end namespace llvm
};
} // end namespace llvm
return Dyld->getMemoryBlock();
}
return Dyld->getMemoryBlock();
}
+StringRef RuntimeDyld::getErrorString()
+{
+ return Dyld->getErrorString();
+}
+
RuntimeDyld Dyld;
// Load the object file into it.
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");
// Get the address of "_main".
void *MainAddress = Dyld.getSymbolAddress("_main");