Constified operator<< in APSInt.
authorTed Kremenek <kremenek@apple.com>
Fri, 8 Feb 2008 07:14:19 +0000 (07:14 +0000)
committerTed Kremenek <kremenek@apple.com>
Fri, 8 Feb 2008 07:14:19 +0000 (07:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46882 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/APSInt.h

index 0b98f74bd0b8827d81a15a169038aca9efc1a96b..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;