This is an archive of the discontinued LLVM Phabricator instance.

Simplify getArgAttrDict/getResultAttrDict by removing unnecessary checks
ClosedPublic

Authored by mehdi_amini on Jun 12 2021, 2:58 PM.

Details

Summary

There is a slight change in behavior: if the arg dictionnary is empty
then we return this empty dictionnary instead of a null attribute.
This is more consistent with accessing it through:

ArrayAttr args_attr = func_op.getAllArgAttrs();
args_attr[num].cast<DictionnaryAttr>() ...

Diff Detail

Event Timeline

mehdi_amini created this revision.Jun 12 2021, 2:58 PM
mehdi_amini requested review of this revision.Jun 12 2021, 2:58 PM
rriddle accepted this revision.Jun 12 2021, 3:21 PM
This revision is now accepted and ready to land.Jun 12 2021, 3:21 PM