[llvm-commits] CVS: llvm/include/llvm/Support/MathExtras.h

Chris Lattner sabre at nondot.org
Sun Mar 4 15:33:20 PST 2007



Changes in directory llvm/include/llvm/Support:

MathExtras.h updated: 1.41 -> 1.42
---
Log message:

fix 80 col violations, mark arrays static


---
Diffs of the changes:  (+12 -8)

 MathExtras.h |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)


Index: llvm/include/llvm/Support/MathExtras.h
diff -u llvm/include/llvm/Support/MathExtras.h:1.41 llvm/include/llvm/Support/MathExtras.h:1.42
--- llvm/include/llvm/Support/MathExtras.h:1.41	Fri Mar  2 16:19:41 2007
+++ llvm/include/llvm/Support/MathExtras.h	Sun Mar  4 17:33:03 2007
@@ -205,9 +205,11 @@
 #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 @@
 #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
 }






More information about the llvm-commits mailing list