Remove Function::getParamAttributes and use the AttributeSet accessor methods instead.
[oota-llvm.git] / include / llvm / Attributes.h
index cc14e965e2d1e60fdeaf313e57226e1428f5724e..8ce7651ae9449b9db9f9f6f2b21fd8a796cf46b3 100644 (file)
@@ -176,8 +176,8 @@ public:
   /// removeAttribute - Remove the attributes from A from the builder.
   AttrBuilder &removeAttributes(const Attribute &A);
 
-  /// contains - Return true if the builder has the specified attribute.
-  bool hasAttribute(Attribute::AttrKind A) const;
+  /// \brief Return true if the builder has the specified attribute.
+  bool contains(Attribute::AttrKind A) const;
 
   /// hasAttributes - Return true if the builder has IR-level attributes.
   bool hasAttributes() const;
@@ -341,6 +341,20 @@ public:
     return getAttributes(Idx).getAlignment();
   }
 
+  /// \brief Return true if the attribute exists at the given index.
+  bool hasAttribute(unsigned Index, Attribute::AttrKind Kind) const;
+
+  /// \brief Return true if attribute exists at the given index.
+  bool hasAttributes(unsigned Index) const;
+
+  /// \brief Get the stack alignment.
+  unsigned getStackAlignment(unsigned Index) const;
+
+  /// \brief Return the attributes at the index as a string.
+  std::string getAsString(unsigned Index) const;
+
+  uint64_t getBitMask(unsigned Index) const;
+
   /// \brief Return true if the specified attribute is set for at least one
   /// parameter or for the return value.
   bool hasAttrSomewhere(Attribute::AttrKind Attr) const;