Skip to content

Commit a9aa267

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

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

mlir/lib/CAPI/ExecutionEngine/ExecutionEngine.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,12 @@ 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+
consumeError(tmBuilderOrError.takeError());
4242
return MlirExecutionEngine{nullptr};
4343
}
4444
auto tmOrError = tmBuilderOrError->createTargetMachine();
4545
if (!tmOrError) {
46-
llvm::errs() << "Failed to create a TargetMachine for the host because: "
47-
<< tmOrError.takeError();
46+
consumeError(tmOrError.takeError());
4847
return MlirExecutionEngine{nullptr};
4948
}
5049

0 commit comments

Comments
 (0)