aboutsummaryrefslogtreecommitdiffstats
path: root/include
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
parent771b675c51d5dd74b5dddf101cfb0ad81b0c99f0 (diff)
downloadexternal_llvm-6401260af24812454817891ca60b2126a14d5b6f.zip
external_llvm-6401260af24812454817891ca60b2126a14d5b6f.tar.gz
external_llvm-6401260af24812454817891ca60b2126a14d5b6f.tar.bz2
trivial optimization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35648 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-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 df90753..d80c601 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;
}
/// @}