Mark the eh.typeid.for intrinsic as being 'const', which it is inside
[oota-llvm.git] / include / llvm / MC / MCRegisterInfo.h
index eeb4f3e8f30562fa2b9877a1d0ae9a98ae28cd15..ada5ae80af0cc37145b139271e9f00ad75c72601 100644 (file)
@@ -33,7 +33,7 @@ private:
   const int CopyCost;
   const bool Allocatable;
   const iterator RegsBegin, RegsEnd;
-  const unsigned char *RegSet;
+  const unsigned char *const RegSet;
   const unsigned RegSetSize;
 public:
   MCRegisterClass(unsigned id, const char *name,
@@ -44,7 +44,7 @@ public:
       Allocatable(Allocable), RegsBegin(RB), RegsEnd(RE), RegSet(Bits),
       RegSetSize(NumBytes) {
     for (iterator i = RegsBegin; i != RegsEnd; ++i)
-       assert (contains(*i) && "Bit field corrupted.");
+       assert(contains(*i) && "Bit field corrupted.");
   }
 
   /// getID() - Return the register class ID number.
@@ -76,7 +76,7 @@ public:
   bool contains(unsigned Reg) const {
     unsigned InByte = Reg % 8;
     unsigned Byte = Reg / 8;
-    if (Byte > RegSetSize)
+    if (Byte >= RegSetSize)
       return false;
     return (RegSet[Byte] & (1 << InByte)) != 0;
   }