This is an archive of the discontinued LLVM Phabricator instance.

[AttrBuilder] Make handling of type attributes more generic (NFCI)
ClosedPublic

Authored by nikic on Jul 8 2021, 2:23 PM.

Details

Summary

While working on the elementtype attribute, I felt that the type attribute handling in AttrBuilder is overly repetitive. This patch converts the separate Type* members into an std::array<Type*>, so that all type attribute kinds can be handled generically.

There's more room for improvement here (especially when it comes to converting the AttrBuilder to an Attribute), but this seems like a good starting point.

Diff Detail