diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2021-07-12 21:25:46 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2021-07-12 21:57:26 +0200 |
commit | 6ac32872ee2fa02bdce54b25641d9a21cfbcfa9a (patch) | |
tree | a14f9547dcb3a79574dc37cbbe2977737e9ddb02 /llvm/lib/IR/Attributes.cpp | |
parent | 279c3a5be3b4f3030584033823f19752325d08ce (diff) | |
download | llvm-6ac32872ee2fa02bdce54b25641d9a21cfbcfa9a.zip llvm-6ac32872ee2fa02bdce54b25641d9a21cfbcfa9a.tar.gz llvm-6ac32872ee2fa02bdce54b25641d9a21cfbcfa9a.tar.bz2 |
[Attributes] Replace doesAttrKindHaveArgument() (NFC)
This is now the same as isIntAttrKind(), so use that instead, as
it does not require manual maintenance. The naming is also more
accurate in that both int and type attributes have an argument,
but this method was only targeting int attributes.
I initially wanted to tighten the AttrBuilder assertion, but we
have some in-tree uses that would violate it.
Diffstat (limited to 'llvm/lib/IR/Attributes.cpp')
-rw-r--r-- | llvm/lib/IR/Attributes.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/llvm/lib/IR/Attributes.cpp b/llvm/lib/IR/Attributes.cpp index 916aa86..06042b2 100644 --- a/llvm/lib/IR/Attributes.cpp +++ b/llvm/lib/IR/Attributes.cpp @@ -242,15 +242,6 @@ StringRef Attribute::getNameFromAttrKind(Attribute::AttrKind AttrKind) { } } -bool Attribute::doesAttrKindHaveArgument(Attribute::AttrKind AttrKind) { - return AttrKind == Attribute::Alignment || - AttrKind == Attribute::StackAlignment || - AttrKind == Attribute::Dereferenceable || - AttrKind == Attribute::AllocSize || - AttrKind == Attribute::DereferenceableOrNull || - AttrKind == Attribute::VScaleRange; -} - bool Attribute::isExistingAttribute(StringRef Name) { return StringSwitch<bool>(Name) #define GET_ATTR_NAMES |