Skip to content

[CIR] Fix error messages when the conversion to MLIR standard dialects fails. #1310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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