mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-06 04:18:00 +00:00
Add remove method to operate on AttrBuilder instead of AttributeSet.
Prior to this change we would have to construct a temporary AttributeSet (which isn't temporary at all given that its allocated on the context), just to contain the attributes in the builder, then call remove on that. Now we can just remove any attributes from the (lightweight and really temporary) builder itself. Will be used in a future commit to remove some temporary attributes sets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236666 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -289,6 +289,12 @@ public:
|
||||
AttributeSet removeAttributes(LLVMContext &C, unsigned Index,
|
||||
AttributeSet Attrs) const;
|
||||
|
||||
/// \brief Remove the specified attributes at the specified index from this
|
||||
/// attribute list. Because attribute lists are immutable, this returns the
|
||||
/// new list.
|
||||
AttributeSet removeAttributes(LLVMContext &C, unsigned Index,
|
||||
const AttrBuilder &Attrs) const;
|
||||
|
||||
/// \brief Add the dereferenceable attribute to the attribute set at the given
|
||||
/// index. Since attribute sets are immutable, this returns a new set.
|
||||
AttributeSet addDereferenceableAttr(LLVMContext &C, unsigned Index,
|
||||
@@ -464,6 +470,13 @@ public:
|
||||
/// \brief Add the attributes from the builder.
|
||||
AttrBuilder &merge(const AttrBuilder &B);
|
||||
|
||||
/// \brief Remove the attributes from the builder.
|
||||
AttrBuilder &remove(const AttrBuilder &B);
|
||||
|
||||
/// \brief \brief Return true if the builder has any attribute that's in the
|
||||
/// specified builder.
|
||||
bool overlaps(const AttrBuilder &B) const;
|
||||
|
||||
/// \brief Return true if the builder has the specified attribute.
|
||||
bool contains(Attribute::AttrKind A) const {
|
||||
assert((unsigned)A < Attribute::EndAttrKinds && "Attribute out of range!");
|
||||
|
||||
Reference in New Issue
Block a user