summaryrefslogtreecommitdiff
path: root/include/llvm/ADT/APInt.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-04-04 06:18:21 +0000
committerChris Lattner <sabre@nondot.org>2007-04-04 06:18:21 +0000
commit6401260af24812454817891ca60b2126a14d5b6f (patch)
tree50fe41e2935e464a6e04f3bc67315ea6c92ca1db /include/llvm/ADT/APInt.h
parent771b675c51d5dd74b5dddf101cfb0ad81b0c99f0 (diff)
downloadllvm-6401260af24812454817891ca60b2126a14d5b6f.tar.gz
llvm-6401260af24812454817891ca60b2126a14d5b6f.tar.bz2
llvm-6401260af24812454817891ca60b2126a14d5b6f.tar.xz
trivial optimization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35648 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/APInt.h')
-rw-r--r--include/llvm/ADT/APInt.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/ADT/APInt.h b/include/llvm/ADT/APInt.h
index df90753f63..d80c601d27 100644
--- a/include/llvm/ADT/APInt.h
+++ b/include/llvm/ADT/APInt.h
@@ -278,7 +278,7 @@ public:
/// This converts the APInt to a boolean value as a test against zero.
/// @brief Boolean conversion function.
inline bool getBoolValue() const {
- return countLeadingZeros() != BitWidth;
+ return *this != 0;
}
/// @}