aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Attributes.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2022-10-11 09:56:37 +0200
committerNikita Popov <npopov@redhat.com>2022-10-11 09:56:37 +0200
commit454722745b4d03b173bb8bd36cdeba6b27428089 (patch)
treeb405f126044202bbb147e61fa047112715034e99 /llvm/lib/IR/Attributes.cpp
parent7b7d3b20ffec9f0af0534178117a7e0c250f6a79 (diff)
downloadllvm-454722745b4d03b173bb8bd36cdeba6b27428089.zip
llvm-454722745b4d03b173bb8bd36cdeba6b27428089.tar.gz
llvm-454722745b4d03b173bb8bd36cdeba6b27428089.tar.bz2
[Attributes] Remove AttrBuilder::hasAlignmentAttr() method (NFC)
This was the odd one out, with similar methods not existing for any other attributes. In the places where it is used, it is best replaced by AttrBuilder::getAttribute(), which allows us to both test for presence of the attribute and retrieve its value at the same time. (To just check for presence, contains() could be used.)
Diffstat (limited to 'llvm/lib/IR/Attributes.cpp')
-rw-r--r--llvm/lib/IR/Attributes.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/llvm/lib/IR/Attributes.cpp b/llvm/lib/IR/Attributes.cpp
index 6d9f94b..e9fc3e0 100644
--- a/llvm/lib/IR/Attributes.cpp
+++ b/llvm/lib/IR/Attributes.cpp
@@ -1795,10 +1795,6 @@ bool AttrBuilder::contains(StringRef A) const {
return getAttribute(A).isValid();
}
-bool AttrBuilder::hasAlignmentAttr() const {
- return getRawIntAttr(Attribute::Alignment) != 0;
-}
-
bool AttrBuilder::operator==(const AttrBuilder &B) const {
return Attrs == B.Attrs;
}