aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-03-04 23:33:03 +0000
committerChris Lattner <sabre@nondot.org>2007-03-04 23:33:03 +0000
commit82a60eca8fb5761817960e75fd469246496f8dce (patch)
tree7b48502c86bf5079d776efab5e3a0e6a9a4c4612 /include
parentd5fa214729e06c7c1e0bc394c5dd9a8d05d588c5 (diff)
downloadexternal_llvm-82a60eca8fb5761817960e75fd469246496f8dce.zip
external_llvm-82a60eca8fb5761817960e75fd469246496f8dce.tar.gz
external_llvm-82a60eca8fb5761817960e75fd469246496f8dce.tar.bz2
fix 80 col violations, mark arrays static
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34915 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Support/MathExtras.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/include/llvm/Support/MathExtras.h b/include/llvm/Support/MathExtras.h
index 3b80d8d..f0bc91f 100644
--- a/include/llvm/Support/MathExtras.h
+++ b/include/llvm/Support/MathExtras.h
@@ -205,9 +205,11 @@ inline unsigned CountTrailingZeros_32(unsigned Value) {
#if __GNUC__ >= 4
return Value ? __builtin_ctz(Value) : 32;
#else
- const unsigned Mod37BitPosition[] = {32, 0, 1, 26, 2, 23, 27, 0, 3, 16, 24, 30, 28, 11, 0, 13,
- 4, 7, 17, 0, 25, 22, 31, 15, 29, 10, 12, 6, 0, 21, 14, 9,
- 5, 20, 8, 19, 18 };
+ static const unsigned Mod37BitPosition[] = {
+ 32, 0, 1, 26, 2, 23, 27, 0, 3, 16, 24, 30, 28, 11, 0, 13,
+ 4, 7, 17, 0, 25, 22, 31, 15, 29, 10, 12, 6, 0, 21, 14, 9,
+ 5, 20, 8, 19, 18
+ };
return Mod37BitPosition[(-Value & Value) % 37];
#endif
}
@@ -220,11 +222,13 @@ inline unsigned CountTrailingZeros_64(uint64_t Value) {
#if __GNUC__ >= 4
return Value ? __builtin_ctzll(Value) : 64;
#else
- const unsigned Mod67Position[] = {64, 0, 1, 39, 2, 15, 40, 23, 3, 12, 16, 59, 41, 19, 24, 54,
- 4, 64, 13, 10, 17, 62, 60, 28, 42, 30, 20, 51, 25, 44, 55,
- 47, 5, 32, 65, 38, 14, 22, 11, 58, 18, 53, 63, 9, 61, 27,
- 29, 50, 43, 46, 31, 37, 21, 57, 52, 8, 26, 49, 45, 36, 56,
- 7, 48, 35, 6, 34, 33, 0 };
+ static const unsigned Mod67Position[] = {
+ 64, 0, 1, 39, 2, 15, 40, 23, 3, 12, 16, 59, 41, 19, 24, 54,
+ 4, 64, 13, 10, 17, 62, 60, 28, 42, 30, 20, 51, 25, 44, 55,
+ 47, 5, 32, 65, 38, 14, 22, 11, 58, 18, 53, 63, 9, 61, 27,
+ 29, 50, 43, 46, 31, 37, 21, 57, 52, 8, 26, 49, 45, 36, 56,
+ 7, 48, 35, 6, 34, 33, 0
+ };
return Mod67Position[(-Value & Value) % 67];
#endif
}