Factor code out of APInt to form a isUIntN helper function.
[oota-llvm.git] / include / llvm / Support / AlignOf.h
index aecb478eefda3d93b08fc73a96b67315a1bc724c..979e5975aa001a310d33eece7c0bf05b15a20888 100644 (file)
@@ -16,7 +16,7 @@
 #define LLVM_SUPPORT_ALIGNOF_H
 
 namespace llvm {
-  
+
 template <typename T>
 struct AlignmentCalcImpl {
   char x;
@@ -24,7 +24,7 @@ struct AlignmentCalcImpl {
 private:
   AlignmentCalcImpl() {} // Never instantiate.
 };
-  
+
 /// AlignOf - A templated class that contains an enum value representing
 ///  the alignment of the template argument.  For example,
 ///  AlignOf<int>::Alignment represents the alignment of type "int".  The
@@ -41,20 +41,20 @@ struct AlignOf {
   enum { Alignment_GreaterEqual_4Bytes = Alignment >= 4 ? 1 : 0 };
   enum { Alignment_GreaterEqual_8Bytes = Alignment >= 8 ? 1 : 0 };
   enum { Alignment_GreaterEqual_16Bytes = Alignment >= 16 ? 1 : 0 };
-  
+
   enum { Alignment_LessEqual_2Bytes = Alignment <= 2 ? 1 : 0 };
-  enum { Alignment_LessEqual_4Bytes = Alignment <= 4 ? 1 : 0 }; 
+  enum { Alignment_LessEqual_4Bytes = Alignment <= 4 ? 1 : 0 };
   enum { Alignment_LessEqual_8Bytes = Alignment <= 8 ? 1 : 0 };
   enum { Alignment_LessEqual_16Bytes = Alignment <= 16 ? 1 : 0 };
 
 };
 
-/// alignof - A templated function that returns the mininum alignment of
+/// alignOf - A templated function that returns the mininum alignment of
 ///  of a type.  This provides no extra functionality beyond the AlignOf
 ///  class besides some cosmetic cleanliness.  Example usage:
-///  alignof<int>() returns the alignment of an int.
+///  alignOf<int>() returns the alignment of an int.
 template <typename T>
-static inline unsigned alignof() { return AlignOf<T>::Alignment; }
-  
+static inline unsigned alignOf() { return AlignOf<T>::Alignment; }
+
 } // end namespace llvm
 #endif