This is an archive of the discontinued LLVM Phabricator instance.

[mlir][ods] Assert on static getAttrName methods
ClosedPublic

Authored by Mogball on Oct 11 2022, 10:41 AM.

Details

Summary

This patch makes ODS insert an assert when calling static get*AttrName
methods with a OperationName that the name is the same as the op's.
This prevents accidentally passing the wrong kind of name and getting an
erroneous attribute name.

Diff Detail

Event Timeline

Mogball created this revision.Oct 11 2022, 10:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 11 2022, 10:41 AM
Mogball requested review of this revision.Oct 11 2022, 10:41 AM
rriddle accepted this revision.Oct 11 2022, 10:44 AM
This revision is now accepted and ready to land.Oct 11 2022, 10:44 AM
This revision was automatically updated to reflect the committed changes.