Skip to content

Commit 7cbbef5

Browse files
committed
[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.
1 parent 9f237c9 commit 7cbbef5

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

llvm/include/llvm/IR/Attributes.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,10 +1074,6 @@ class AttrBuilder {
10741074
/// Return true if the builder has IR-level attributes.
10751075
bool hasAttributes() const;
10761076

1077-
/// Return true if the builder has any attribute that's in the
1078-
/// specified attribute.
1079-
bool hasAttributes(AttributeList A, uint64_t Index) const;
1080-
10811077
/// Return true if the builder has an alignment attribute.
10821078
bool hasAlignmentAttr() const;
10831079

llvm/lib/IR/Attributes.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1805,22 +1805,6 @@ bool AttrBuilder::hasAttributes() const {
18051805
return !Attrs.none() || !TargetDepAttrs.empty();
18061806
}
18071807

1808-
bool AttrBuilder::hasAttributes(AttributeList AL, uint64_t Index) const {
1809-
AttributeSet AS = AL.getAttributes(Index);
1810-
1811-
for (const auto &Attr : AS) {
1812-
if (Attr.isEnumAttribute() || Attr.isIntAttribute()) {
1813-
if (contains(Attr.getKindAsEnum()))
1814-
return true;
1815-
} else {
1816-
assert(Attr.isStringAttribute() && "Invalid attribute kind!");
1817-
return contains(Attr.getKindAsString());
1818-
}
1819-
}
1820-
1821-
return false;
1822-
}
1823-
18241808
bool AttrBuilder::hasAlignmentAttr() const {
18251809
return getRawIntAttr(Attribute::Alignment) != 0;
18261810
}

0 commit comments

Comments
 (0)