This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Reduce warnings for bad assertion in generated code
ClosedPublic

Authored by clementval on Aug 1 2023, 10:53 AM.

Details

Summary

When the operation has no attributes, the generated assertion is
always false and triggers lots of warnings in the build.

warning: comparison of unsigned expression < 0 is always false

Just return a StringAttr when there is no attribute.

Diff Detail

Event Timeline

clementval created this revision.Aug 1 2023, 10:53 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 1 2023, 10:53 AM
clementval requested review of this revision.Aug 1 2023, 10:53 AM
mehdi_amini accepted this revision.Aug 1 2023, 2:49 PM
This revision is now accepted and ready to land.Aug 1 2023, 2:49 PM