[llvm] 0d7fbb0 - [AttrBuilder] Remove unused removeAttributes() overload
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 16 12:33:44 PST 2022
Author: Nikita Popov
Date: 2022-01-16T21:32:54+01:00
New Revision: 0d7fbb0737681bdabf53891c2e5f96dadf4a39ce
URL: https://github.com/llvm/llvm-project/commit/0d7fbb0737681bdabf53891c2e5f96dadf4a39ce
DIFF: https://github.com/llvm/llvm-project/commit/0d7fbb0737681bdabf53891c2e5f96dadf4a39ce.diff
LOG: [AttrBuilder] Remove unused removeAttributes() overload
The idiomatic way would be to call remove() with an AttributeMask
constructed from an AttributeSet.
Added:
Modified:
llvm/include/llvm/IR/Attributes.h
llvm/lib/IR/Attributes.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/IR/Attributes.h b/llvm/include/llvm/IR/Attributes.h
index 0156fd91e37e..236056612ee3 100644
--- a/llvm/include/llvm/IR/Attributes.h
+++ b/llvm/include/llvm/IR/Attributes.h
@@ -1048,9 +1048,6 @@ class AttrBuilder {
return removeAttribute(A.getKindAsEnum());
}
- /// Remove the attributes from the builder.
- AttrBuilder &removeAttributes(AttributeList A, uint64_t WithoutIndex);
-
/// Add the attributes from the builder.
AttrBuilder &merge(const AttrBuilder &B);
diff --git a/llvm/lib/IR/Attributes.cpp b/llvm/lib/IR/Attributes.cpp
index 0960e5db289a..fa8cc44083a6 100644
--- a/llvm/lib/IR/Attributes.cpp
+++ b/llvm/lib/IR/Attributes.cpp
@@ -1608,11 +1608,6 @@ AttrBuilder &AttrBuilder::addAttribute(StringRef A, StringRef V) {
return addAttribute(Attribute::get(Ctx, A, V));
}
-AttrBuilder &AttrBuilder::removeAttributes(AttributeList AL, uint64_t Index) {
- remove(AttributeMask(AL.getAttributes(Index)));
- return *this;
-}
-
AttrBuilder &AttrBuilder::removeAttribute(Attribute::AttrKind Val) {
assert((unsigned)Val < Attribute::EndAttrKinds && "Attribute out of range!");
Attrs[Val] = false;
More information about the llvm-commits
mailing list