summaryrefslogtreecommitdiff
path: root/include/llvm/ADT/APInt.h
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2013-05-24 22:23:49 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2013-05-24 22:23:49 +0000
commitc6af2432c802d241c8fffbe0371c023e6c58844e (patch)
tree98918e0d95a674aa47cd70cefd9bb5b9daed7b48 /include/llvm/ADT/APInt.h
parent54c74823885eade8173965f8bb99f026aacb9657 (diff)
downloadllvm-c6af2432c802d241c8fffbe0371c023e6c58844e.tar.gz
llvm-c6af2432c802d241c8fffbe0371c023e6c58844e.tar.bz2
llvm-c6af2432c802d241c8fffbe0371c023e6c58844e.tar.xz
Replace Count{Leading,Trailing}Zeros_{32,64} with count{Leading,Trailing}Zeros.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182680 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/APInt.h')
-rw-r--r--include/llvm/ADT/APInt.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/llvm/ADT/APInt.h b/include/llvm/ADT/APInt.h
index 6f9450b8b0..a7fc207bb7 100644
--- a/include/llvm/ADT/APInt.h
+++ b/include/llvm/ADT/APInt.h
@@ -1399,18 +1399,18 @@ public:
/// equivalent of the string given by \p str.
static unsigned getBitsNeeded(StringRef str, uint8_t radix);
- /// \brief Count the number of zeros from the msb to the first one bit.
+ /// \brief The APInt version of the countLeadingZeros functions in
+ /// MathExtras.h.
///
- /// This function is an APInt version of the countLeadingZeros_{32,64}
- /// functions in MathExtras.h. It counts the number of zeros from the most
- /// significant bit to the first one bit.
+ /// It counts the number of zeros from the most significant bit to the first
+ /// one bit.
///
/// \returns BitWidth if the value is zero, otherwise returns the number of
- /// zeros from the most significant bit to the first one bits.
+ /// zeros from the most significant bit to the first one bits.
unsigned countLeadingZeros() const {
if (isSingleWord()) {
unsigned unusedBits = APINT_BITS_PER_WORD - BitWidth;
- return CountLeadingZeros_64(VAL) - unusedBits;
+ return llvm::countLeadingZeros(VAL) - unusedBits;
}
return countLeadingZerosSlowCase();
}