summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-10-09 09:11:20 +0000
committerBill Wendling <isanbard@gmail.com>2012-10-09 09:11:20 +0000
commit93f70b78fd8509536ff34fdf7343ad069e8dcef5 (patch)
treefe878ee03b25a19ddb5088fea3357557a6bbdeae /llvm/include
parent83ecabe6e605421ae0b5a50c5e240b846ba52042 (diff)
downloadbcm5719-llvm-93f70b78fd8509536ff34fdf7343ad069e8dcef5.tar.gz
bcm5719-llvm-93f70b78fd8509536ff34fdf7343ad069e8dcef5.zip
Use the enum value of the attributes when adding them to the attributes builder.
llvm-svn: 165494
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