[IR] Simplify Attribute::getAsString() (NFC)
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 7 Jul 2021 20:41:12 +0000 (22:41 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 7 Jul 2021 20:43:17 +0000 (22:43 +0200)
commite000b848e65c3fc7d3c153d15cd20bbd92d9427c
tree8a4812a1d8184759ed2f8ca969582e00bbc50436
parentcae3b831f4304d4487dd7c767ff88face51ea0dc
[IR] Simplify Attribute::getAsString() (NFC)

Avoid enumerating all attributes here and instead use
getNameFromAttrKind(), which is based on the tablegen data.

This only leaves us with custom handling for int attributes,
which don't have uniform printing.
llvm/lib/IR/Attributes.cpp