summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/Attributes.h36
-rw-r--r--llvm/include/llvm/AttributesImpl.h3
2 files changed, 10 insertions, 29 deletions
diff --git a/llvm/include/llvm/Attributes.h b/llvm/include/llvm/Attributes.h
index eae384a4669..00eb325cacd 100644
--- a/llvm/include/llvm/Attributes.h
+++ b/llvm/include/llvm/Attributes.h
@@ -205,31 +205,8 @@ public:
uint64_t getAlignment() const;
- void addAddressSafetyAttr();
- void addAlwaysInlineAttr();
- void addByValAttr();
- void addInlineHintAttr();
- void addInRegAttr();
- void addNakedAttr();
- void addNestAttr();
- void addNoAliasAttr();
- void addNoCaptureAttr();
- void addNoImplicitFloatAttr();
- void addNoInlineAttr();
- void addNonLazyBindAttr();
- void addNoRedZoneAttr();
- void addNoReturnAttr();
- void addNoUnwindAttr();
- void addOptimizeForSizeAttr();
- void addReadNoneAttr();
- void addReadOnlyAttr();
- void addReturnsTwiceAttr();
- void addSExtAttr();
- void addStackProtectAttr();
- void addStackProtectReqAttr();
- void addStructRetAttr();
- void addUWTableAttr();
- void addZExtAttr();
+ void addAttribute(Attributes::AttrVal Val);
+ void removeAttribute(Attributes::AttrVal Val);
void addAlignmentAttr(unsigned Align);
void addStackAlignmentAttr(unsigned Align);
@@ -276,13 +253,16 @@ public:
return hasAttribute(Attributes::StructRet);
}
- // Attribute query methods.
- // FIXME: StackAlignment & Alignment attributes have no predicate methods.
+ /// @brief Return true if the attribute is present.
+ bool hasAttribute(AttrVal Val) const;
+
+ /// @brief Return true if attributes exist
bool hasAttributes() const {
return Attrs.hasAttributes();
}
+
+ /// @brief Return true if the attributes are a non-null intersection.
bool hasAttributes(const Attributes &A) const;
- bool hasAttribute(AttrVal Val) const;
/// This returns the alignment field of an attribute as a byte alignment
/// value.
diff --git a/llvm/include/llvm/AttributesImpl.h b/llvm/include/llvm/AttributesImpl.h
index 4f68cb4c3ee..eea11a7011a 100644
--- a/llvm/include/llvm/AttributesImpl.h
+++ b/llvm/include/llvm/AttributesImpl.h
@@ -25,7 +25,6 @@ class AttributesImpl : public FoldingSetNode {
friend class Attributes;
uint64_t Bits; // FIXME: We will be expanding this.
- uint64_t getAttrMask(uint64_t Val) const;
public:
AttributesImpl(uint64_t bits) : Bits(bits) {}
@@ -39,6 +38,8 @@ public:
bool isEmptyOrSingleton() const;
+ static uint64_t getAttrMask(uint64_t Val);
+
void Profile(FoldingSetNodeID &ID) const {
Profile(ID, Bits);
}
OpenPOWER on IntegriCloud