Make isNegative() a const function since it doesn't modify the APInt.
[oota-llvm.git] / include / llvm / ADT / APInt.h
index 489675d3b7f816c6fa8ecc13fe070ed908c97ecc..a22ed8294cd48cc16ca65cdacdb1eb4b7fdd0921 100644 (file)
@@ -355,7 +355,7 @@ public:
   /// This just tests the high bit of this APInt to determine if it is negative.
   /// @returns true if this APInt is negative, false otherwise
   /// @brief Determine sign of this APInt.
-  bool isNegative() {
+  bool isNegative() const {
     return (*this)[BitWidth - 1];
   }