Use proper type for the index.
authorBill Wendling <isanbard@gmail.com>
Mon, 28 Jan 2013 01:30:29 +0000 (01:30 +0000)
committerBill Wendling <isanbard@gmail.com>
Mon, 28 Jan 2013 01:30:29 +0000 (01:30 +0000)
llvm-svn: 173646

llvm/include/llvm/IR/Attributes.h
llvm/lib/IR/Attributes.cpp

index 89a73d6..2fce6ce 100644 (file)
@@ -214,7 +214,7 @@ private:
 
   /// \brief The attributes for the specified index are returned.  Attributes
   /// for the result are denoted with Idx = 0.
-  Attribute getAttributes(unsigned Idx) const;
+  Attribute getAttributes(uint64_t Idx) const;
 
   /// \brief Add the specified attribute at the specified index to this
   /// attribute list.  Since attribute lists are immutable, this returns the new
@@ -297,25 +297,25 @@ public:
   AttributeSet getFnAttributes() const;
 
   /// \brief Return the alignment for the specified function parameter.
-  unsigned getParamAlignment(unsigned Idx) const;
+  unsigned getParamAlignment(uint64_t Idx) const;
 
   /// \brief Return true if the attribute exists at the given index.
-  bool hasAttribute(unsigned Index, Attribute::AttrKind Kind) const;
+  bool hasAttribute(uint64_t Index, Attribute::AttrKind Kind) const;
 
   /// \brief Return true if attribute exists at the given index.
-  bool hasAttributes(unsigned Index) const;
+  bool hasAttributes(uint64_t Index) const;
 
   /// \brief Returns the alignment field of an attribute as a byte alignment
   /// value.
-  unsigned getAlignment(unsigned Index) const;
+  unsigned getAlignment(uint64_t Index) const;
 
   /// \brief Get the stack alignment.
-  unsigned getStackAlignment(unsigned Index) const;
+  unsigned getStackAlignment(uint64_t Index) const;
 
   /// \brief Return the attributes at the index as a string.
-  std::string getAsString(unsigned Index) const;
+  std::string getAsString(uint64_t Index) const;
 
-  uint64_t Raw(unsigned Index) const;
+  uint64_t Raw(uint64_t Index) const;
 
   /// \brief Return true if the specified attribute is set for at least one
   /// parameter or for the return value.
index 6745486..544c3cf 100644 (file)
@@ -710,27 +710,27 @@ AttributeSet AttributeSet::getSlotAttributes(unsigned Slot) const {
   return pImpl->getSlotAttributes(Slot);
 }
 
-bool AttributeSet::hasAttribute(unsigned Index, Attribute::AttrKind Kind) const{
+bool AttributeSet::hasAttribute(uint64_t Index, Attribute::AttrKind Kind) const{
   return getAttributes(Index).hasAttribute(Kind);
 }
 
-bool AttributeSet::hasAttributes(unsigned Index) const {
+bool AttributeSet::hasAttributes(uint64_t Index) const {
   return getAttributes(Index).hasAttributes();
 }
 
-std::string AttributeSet::getAsString(unsigned Index) const {
+std::string AttributeSet::getAsString(uint64_t Index) const {
   return getAttributes(Index).getAsString();
 }
 
-unsigned AttributeSet::getParamAlignment(unsigned Idx) const {
+unsigned AttributeSet::getParamAlignment(uint64_t Idx) const {
   return getAttributes(Idx).getAlignment();
 }
 
-unsigned AttributeSet::getStackAlignment(unsigned Index) const {
+unsigned AttributeSet::getStackAlignment(uint64_t Index) const {
   return getAttributes(Index).getStackAlignment();
 }
 
-uint64_t AttributeSet::Raw(unsigned Index) const {
+uint64_t AttributeSet::Raw(uint64_t Index) const {
   // FIXME: Remove this.
   return pImpl ? pImpl->Raw(Index) : 0;
 }
@@ -738,7 +738,7 @@ uint64_t AttributeSet::Raw(unsigned Index) const {
 /// \brief The attributes for the specified index are returned.
 ///
 /// FIXME: This shouldn't return 'Attribute'.
-Attribute AttributeSet::getAttributes(unsigned Idx) const {
+Attribute AttributeSet::getAttributes(uint64_t Idx) const {
   if (pImpl == 0) return Attribute();
 
   // Loop through to find the attribute we want.