Skip to content

Commit

Permalink
[CIR] Fix error messages when the conversion to MLIR standard dialect…
Browse files Browse the repository at this point in the history
…s fails. (#1310)

The old error message is wrong, as the `ConvertCIRToMLIRPass` does not
convert to LLVM Dialect but to MLIR standard dialects.
  • Loading branch information
Jezurko authored Feb 12, 2025
1 parent 03e6535 commit 090718c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions clang/lib/CIR/Lowering/ThroughMLIR/LowerCIRToMLIR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1505,11 +1505,12 @@ mlir::ModuleOp lowerFromCIRToMLIR(mlir::ModuleOp theModule,
auto result = !mlir::failed(pm.run(theModule));
if (!result)
report_fatal_error(
"The pass manager failed to lower CIR to LLVMIR dialect!");
"The pass manager failed to lower CIR to MLIR standard dialects!");

// Now that we ran all the lowering passes, verify the final output.
if (theModule.verify().failed())
report_fatal_error("Verification of the final LLVMIR dialect failed!");
report_fatal_error(
"Verification of the final MLIR in standard dialects failed!");

return theModule;
}
Expand Down

0 comments on commit 090718c

Please sign in to comment.