forked from OSchip/llvm-project
Preserve the error message when MemoryBuffer creation fails
Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D86326
This commit is contained in:
parent
02e02f5398
commit
670063eb22
|
@ -251,7 +251,8 @@ Expected<std::unique_ptr<ExecutionEngine>> ExecutionEngine::create(
|
|||
for (auto libPath : sharedLibPaths) {
|
||||
auto mb = llvm::MemoryBuffer::getFile(libPath);
|
||||
if (!mb) {
|
||||
errs() << "Fail to create MemoryBuffer for: " << libPath << "\n";
|
||||
errs() << "Failed to create MemoryBuffer for: " << libPath
|
||||
<< "\nError: " << mb.getError().message() << "\n";
|
||||
continue;
|
||||
}
|
||||
auto &JD = session.createBareJITDylib(std::string(libPath));
|
||||
|
|
Loading…
Reference in New Issue