Sort a few more #include lines in tools/... unittests/... and utils/...
[oota-llvm.git] / include / llvm / Attributes.h
index 7b621249d72496b702a1d3d214708894fcb5aa7d..c28f0bd09075de6a5c97f29c25792905e8782129 100644 (file)
@@ -120,6 +120,10 @@ public:
   /// alignment value.
   unsigned getStackAlignment() const;
 
+  bool operator==(AttrKind K) const;
+  bool operator!=(AttrKind K) const;
+
+  // FIXME: Remove these 'operator' methods.
   bool operator==(const Attribute &A) const {
     return pImpl == A.pImpl;
   }
@@ -141,11 +145,10 @@ public:
   /// that have been decoded from the given integer.  This function must stay in
   /// sync with 'encodeLLVMAttributesForBitcode'.
   static Attribute decodeLLVMAttributesForBitcode(LLVMContext &C,
-                                                   uint64_t EncodedAttrs);
+                                                  uint64_t EncodedAttrs);
 
-  /// \brief The set of attributes set in Attribute is converted to a string of
-  /// equivalent mnemonics. This is, presumably, for writing out the mnemonics
-  /// for the assembly writer.
+  /// \brief The Attribute is converted to a string of equivalent mnemonic. This
+  /// is, presumably, for writing out the mnemonics for the assembly writer.
   std::string getAsString() const;
 };
 
@@ -330,24 +333,29 @@ public:
     return getAttributes(FunctionIndex);
   }
 
-  /// \brief Return true if the specified parameter index has the specified
-  /// attribute set.
-  bool paramHasAttr(unsigned Idx, Attribute Attr) const {
-    return getAttributes(Idx).hasAttributes(Attr);
-  }
-
   /// \brief Return the alignment for the specified function parameter.
   unsigned getParamAlignment(unsigned Idx) const {
     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;
 
-  unsigned getNumAttrs() const;
-  Attribute &getAttributesAtIndex(unsigned i) const;
-
   /// operator==/!= - Provide equality predicates.
   bool operator==(const AttributeSet &RHS) const {
     return AttrList == RHS.AttrList;