aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Attributes.cpp
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2022-01-16 20:58:38 +0100
committerNikita Popov <nikita.ppv@gmail.com>2022-01-16 21:00:18 +0100
commit7cbbef5bbc35edb1324408deb418516fb9fadcf4 (patch)
treefd61c1ee2fd598965bd475b395783d8a02e60574 /llvm/lib/IR/Attributes.cpp
parent9f237c9e7d88033bd777494dcc06fa5b74ee4fec (diff)
downloadllvm-7cbbef5bbc35edb1324408deb418516fb9fadcf4.zip
llvm-7cbbef5bbc35edb1324408deb418516fb9fadcf4.tar.gz
llvm-7cbbef5bbc35edb1324408deb418516fb9fadcf4.tar.bz2
[AttrBuilder] Remove unused hasAttributes() overload
This is unused, and doesn't make a lot of sense as an API. The usual pattern would be to combine the AttrBuilder(AttributeSet) constructor with the overlaps() method.
Diffstat (limited to 'llvm/lib/IR/Attributes.cpp')
-rw-r--r--llvm/lib/IR/Attributes.cpp16
1 files changed, 0 insertions, 16 deletions
diff --git a/llvm/lib/IR/Attributes.cpp b/llvm/lib/IR/Attributes.cpp
index c680f9f..0960e5d 100644
--- a/llvm/lib/IR/Attributes.cpp
+++ b/llvm/lib/IR/Attributes.cpp
@@ -1805,22 +1805,6 @@ bool AttrBuilder::hasAttributes() const {
return !Attrs.none() || !TargetDepAttrs.empty();
}
-bool AttrBuilder::hasAttributes(AttributeList AL, uint64_t Index) const {
- AttributeSet AS = AL.getAttributes(Index);
-
- for (const auto &Attr : AS) {
- if (Attr.isEnumAttribute() || Attr.isIntAttribute()) {
- if (contains(Attr.getKindAsEnum()))
- return true;
- } else {
- assert(Attr.isStringAttribute() && "Invalid attribute kind!");
- return contains(Attr.getKindAsString());
- }
- }
-
- return false;
-}
-
bool AttrBuilder::hasAlignmentAttr() const {
return getRawIntAttr(Attribute::Alignment) != 0;
}