Skip to content

Commit a5209cd

Browse files
committed
[mlir][ExecutionEngine] propagate errors in mlirExecutionEngineCreate
1 parent 61c4259 commit a5209cd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

mlir/lib/CAPI/ExecutionEngine/ExecutionEngine.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,15 @@ mlirExecutionEngineCreate(MlirModule op, int optLevel, int numPaths,
3838

3939
auto tmBuilderOrError = llvm::orc::JITTargetMachineBuilder::detectHost();
4040
if (!tmBuilderOrError) {
41-
llvm::errs() << "Failed to create a JITTargetMachineBuilder for the host\n";
41+
llvm::errs()
42+
<< "Failed to create a JITTargetMachineBuilder for the host because: "
43+
<< tmBuilderOrError.takeError() << "\n";
4244
return MlirExecutionEngine{nullptr};
4345
}
4446
auto tmOrError = tmBuilderOrError->createTargetMachine();
4547
if (!tmOrError) {
4648
llvm::errs() << "Failed to create a TargetMachine for the host because: "
47-
<< tmOrError.takeError();
49+
<< tmOrError.takeError() << "\n";
4850
return MlirExecutionEngine{nullptr};
4951
}
5052

0 commit comments

Comments
 (0)