Skip to content

[MLIR][TableGen] Error on APInt parameter without custom comparator #135970

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 6 commits into from
Apr 22, 2025
Prev Previous commit
Next Next commit
fixup! [MLIR][TableGen] Warn on APInt parameter without custom compar…
…ator

Co-authored-by: Tobias Gysi <tobias.gysi@nextsilicon.com>
  • Loading branch information
Jezurko and gysit authored Apr 17, 2025
commit 38b3e8bf140c2998a711eaa794eed46f5d78a07b
6 changes: 3 additions & 3 deletions mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -683,10 +683,10 @@ void DefGen::emitStorageClass() {
PrintWarning(
def.getLoc(),
"Using a raw APInt parameter without a custom comparator is "
"discouraged because an assert in the equality operator is "
"not supported because an assert in the equality operator is "
"triggered when the two APInts have different bit widths. This can "
"lead to unexpected crashes. Consider using an `APIntParameter` or "
"providing a custom comparator.");
"lead to unexpected crashes. Use an `APIntParameter` or "
"provide a custom comparator.");
}
storageCls->declare<Field>(param.getCppType(), param.getName());
}
Expand Down
Loading