This is an archive of the discontinued LLVM Phabricator instance.

[AsmParser] Unify parsing of attributes
ClosedPublic

Authored by nikic on Jul 13 2021, 2:02 PM.

Details

Reviewers
aeubanks
Group Reviewers
Restricted Project
Commits
rGf59209a86eaf: [AsmParser] Unify parsing of attributes
Summary

Continuing on from D105780, this should be the last major bit of attribute cleanup. Currently, LLParser implements attribute parsing for functions, parameters and returns separately, enumerating all supported (and unsupported) attributes each time. This patch extracts the common parsing logic, and performs a check afterwards whether the attribute is valid in the given position. Parameters and returns are handled together, while function attributes need slightly different logic to support attribute groups.

Diff Detail

Event Timeline

nikic created this revision.Jul 13 2021, 2:02 PM
nikic requested review of this revision.Jul 13 2021, 2:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 13 2021, 2:02 PM
aeubanks accepted this revision.Jul 14 2021, 3:35 PM
aeubanks added a subscriber: aeubanks.

nice cleanup!

This revision is now accepted and ready to land.Jul 14 2021, 3:35 PM
This revision was landed with ongoing or failed builds.Jul 15 2021, 8:51 AM
This revision was automatically updated to reflect the committed changes.