This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Convert NamedAttribute to be a class
ClosedPublic

Authored by rriddle on Nov 15 2021, 5:23 PM.

Details

Summary

NamedAttribute is currently represented as an std::pair, but this
creates an extremely clunky .first/.second API. This commit
converts it to a class, with better accessors (getName/getValue)
and also opens the door for more convenient API in the future.

Diff Detail

Event Timeline

rriddle created this revision.Nov 15 2021, 5:23 PM
rriddle requested review of this revision.Nov 15 2021, 5:23 PM

Nice! This std::pair was fairly annoying to me :)

rriddle updated this revision to Diff 387666.Nov 16 2021, 8:49 AM

fix flang

Herald added a project: Restricted Project. · View Herald TranscriptNov 16 2021, 8:49 AM
aartbik accepted this revision.Nov 16 2021, 1:03 PM

LGTM sparse/vector

This revision is now accepted and ready to land.Nov 16 2021, 1:03 PM
mehdi_amini accepted this revision.Nov 17 2021, 4:01 PM
jpienaar accepted this revision.Nov 17 2021, 4:26 PM
This revision was automatically updated to reflect the committed changes.