Use Function's arg_size() and size() methods.
[oota-llvm.git] / include / llvm / Target / TargetRegisterInfo.h
index e902cafa9bdb34a1691a4ebcd616459d866f3204..08b9bfc7649022140b3fe3d2251c9caa80d49093 100644 (file)
@@ -61,7 +61,7 @@ public:
   typedef const unsigned* iterator;
   typedef const unsigned* const_iterator;
 
-  typedef const MVT::ValueType* vt_iterator;
+  typedef const MVT* vt_iterator;
   typedef const TargetRegisterClass* const * sc_iterator;
 private:
   unsigned ID;
@@ -76,7 +76,7 @@ private:
   const iterator RegsBegin, RegsEnd;
 public:
   TargetRegisterClass(unsigned id,
-                      const MVT::ValueType *vts,
+                      const MVT *vts,
                       const TargetRegisterClass * const *subcs,
                       const TargetRegisterClass * const *supcs,
                       const TargetRegisterClass * const *subregcs,
@@ -99,7 +99,7 @@ public:
 
   /// getNumRegs - Return the number of registers in this class.
   ///
-  unsigned getNumRegs() const { return RegsEnd-RegsBegin; }
+  unsigned getNumRegs() const { return (unsigned)(RegsEnd-RegsBegin); }
 
   /// getRegister - Return the specified register in the class.
   ///
@@ -118,7 +118,7 @@ public:
 
   /// hasType - return true if this TargetRegisterClass has the ValueType vt.
   ///
-  bool hasType(MVT::ValueType vt) const {
+  bool hasType(MVT vt) const {
     for(int i = 0; VTs[i] != MVT::Other; ++i)
       if (VTs[i] == vt)
         return true;
@@ -324,7 +324,7 @@ public:
   /// register of the given type. If type is MVT::Other, then just return any
   /// register class the register belongs to.
   const TargetRegisterClass *getPhysicalRegisterRegClass(unsigned Reg,
-                                          MVT::ValueType VT = MVT::Other) const;
+                                          MVT VT = MVT::Other) const;
 
   /// getAllocatableSet - Returns a bitset indexed by register number
   /// indicating if a register is allocatable or not. If a register class is
@@ -465,7 +465,7 @@ public:
   regclass_iterator regclass_end() const { return RegClassEnd; }
 
   unsigned getNumRegClasses() const {
-    return regclass_end()-regclass_begin();
+    return (unsigned)(regclass_end()-regclass_begin());
   }
   
   /// getRegClass - Returns the register class associated with the enumeration