[llvm] r174130 - Remove one of the odious 'Raw' methods.

Bill Wendling isanbard at gmail.com
Thu Jan 31 16:48:14 PST 2013


Author: void
Date: Thu Jan 31 18:48:14 2013
New Revision: 174130

URL: http://llvm.org/viewvc/llvm-project?rev=174130&view=rev
Log:
Remove one of the odious 'Raw' methods.

Modified:
    llvm/trunk/include/llvm/IR/Attributes.h
    llvm/trunk/lib/IR/AttributeImpl.h
    llvm/trunk/lib/IR/Attributes.cpp

Modified: llvm/trunk/include/llvm/IR/Attributes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Attributes.h?rev=174130&r1=174129&r2=174130&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Attributes.h (original)
+++ llvm/trunk/include/llvm/IR/Attributes.h Thu Jan 31 18:48:14 2013
@@ -159,9 +159,6 @@ public:
   void Profile(FoldingSetNodeID &ID) const {
     ID.AddPointer(pImpl);
   }
-
-  // FIXME: Remove this.
-  uint64_t Raw() const;
 };
 
 //===----------------------------------------------------------------------===//
@@ -272,8 +269,8 @@ public:
 
   typedef ArrayRef<Attribute>::iterator iterator;
 
-  iterator begin(unsigned Idx);
-  iterator end(unsigned Idx);
+  iterator begin(unsigned Idx) const;
+  iterator end(unsigned Idx) const;
 
   /// operator==/!= - Provide equality predicates.
   bool operator==(const AttributeSet &RHS) const {

Modified: llvm/trunk/lib/IR/AttributeImpl.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/AttributeImpl.h?rev=174130&r1=174129&r2=174130&view=diff
==============================================================================
--- llvm/trunk/lib/IR/AttributeImpl.h (original)
+++ llvm/trunk/lib/IR/AttributeImpl.h Thu Jan 31 18:48:14 2013
@@ -77,8 +77,7 @@ public:
       ID.AddPointer(Vals[I]);
   }
 
-  // FIXME: Remove these!
-  uint64_t Raw() const;
+  // FIXME: Remove this!
   static uint64_t getAttrMask(Attribute::AttrKind Val);
 };
 

Modified: llvm/trunk/lib/IR/Attributes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Attributes.cpp?rev=174130&r1=174129&r2=174130&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Attributes.cpp (original)
+++ llvm/trunk/lib/IR/Attributes.cpp Thu Jan 31 18:48:14 2013
@@ -223,10 +223,6 @@ bool Attribute::operator<(Attribute A) c
   return *pImpl < *A.pImpl;
 }
 
-uint64_t Attribute::Raw() const {
-  return pImpl ? pImpl->Raw() : 0;
-}
-
 //===----------------------------------------------------------------------===//
 // AttributeImpl Definition
 //===----------------------------------------------------------------------===//
@@ -308,11 +304,6 @@ bool AttributeImpl::operator<(const Attr
   return ThisCDA->getAsString() < ThatCDA->getAsString();
 }
 
-uint64_t AttributeImpl::Raw() const {
-  // FIXME: Remove this.
-  return cast<ConstantInt>(Kind)->getZExtValue();
-}
-
 uint64_t AttributeImpl::getAttrMask(Attribute::AttrKind Val) {
   // FIXME: Remove this.
   switch (Val) {
@@ -740,13 +731,13 @@ AttributeSetNode *AttributeSet::getAttri
   return 0;
 }
 
-AttributeSet::iterator AttributeSet::begin(unsigned Idx) {
+AttributeSet::iterator AttributeSet::begin(unsigned Idx) const {
   if (!pImpl)
     return ArrayRef<Attribute>().begin();
   return pImpl->begin(Idx);
 }
 
-AttributeSet::iterator AttributeSet::end(unsigned Idx) {
+AttributeSet::iterator AttributeSet::end(unsigned Idx) const {
   if (!pImpl)
     return ArrayRef<Attribute>().end();
   return pImpl->end(Idx);





More information about the llvm-commits mailing list