aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Attributes.h
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
commit2e879bcd52583335c753c005d203bf2ffe8b67b5 (patch)
tree519df78db10304e80747bbaecab158bc53664152 /include/llvm/Attributes.h
parente97a3a4b4fccbe6283b616af93ab0117d3a7fee9 (diff)
Use the enum value of the attributes when adding them to the attributes builder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165494 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Attributes.h')
-rw-r--r--include/llvm/Attributes.h36
1 files changed, 8 insertions, 28 deletions
diff --git a/include/llvm/Attributes.h b/include/llvm/Attributes.h
index eae384a466..00eb325cac 100644
--- a/include/llvm/Attributes.h
+++ b/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.