From 862ee00550698f64047f779a433d925f301bf105 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Mon, 26 Feb 2007 07:45:40 +0000 Subject: [PATCH] Make isNegative() a const function since it doesn't modify the APInt. llvm-svn: 34630 --- llvm/include/llvm/ADT/APInt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/include/llvm/ADT/APInt.h b/llvm/include/llvm/ADT/APInt.h index 489675d3b7f8..a22ed8294cd4 100644 --- a/llvm/include/llvm/ADT/APInt.h +++ b/llvm/include/llvm/ADT/APInt.h @@ -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]; }