Remove an unnecessary reinterpret_cast.
[oota-llvm.git] / include / llvm / ADT / APSInt.h
index be419272fec8746316949abd4a680e51cfc589ac..705585c8a0c976da8a702ccdc9881f2893a471e0 100644 (file)
@@ -130,8 +130,8 @@ public:
   // The remaining operators just wrap the logic of APInt, but retain the
   // signedness information.
   
-  APSInt operator<<(unsigned Bits) {
-    return APSInt(static_cast<APInt&>(*this) << Bits, IsUnsigned);
+  APSInt operator<<(unsigned Bits) const {
+    return APSInt(static_cast<const APInt&>(*this) << Bits, IsUnsigned);
   }  
   APSInt& operator<<=(unsigned Amt) {
     *this = *this << Amt;
@@ -223,7 +223,7 @@ public:
     assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
     return APSInt(static_cast<const APInt&>(*this) - RHS, IsUnsigned);
   }
-  APSInt operator~() {    
+  APSInt operator~() const {    
     return APSInt(~static_cast<const APInt&>(*this), IsUnsigned);
   }