diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-04-28 17:58:20 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-04-28 17:58:20 +0000 |
commit | 9d695d5f7d31e912a2be74229b3e2baab2564820 (patch) | |
tree | 2c155b645fcfa849e9bf4221fa611c7878133667 | |
parent | c9715624fa096bf412bf5d63214d9ea8fae485af (diff) |
Add more alignment enums.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50363 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Support/AlignOf.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/Support/AlignOf.h b/include/llvm/Support/AlignOf.h index a6d3f25c26..108c59f0eb 100644 --- a/include/llvm/Support/AlignOf.h +++ b/include/llvm/Support/AlignOf.h @@ -35,10 +35,17 @@ private: template <typename T> struct AlignOf { enum { Alignment = sizeof(AlignmentCalcImpl<T>) - sizeof(T) }; + enum { Alignment_GreaterEqual_2Bytes = Alignment >= 2 ? 1 : 0 }; 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_8Bytes = Alignment <= 8 ? 1 : 0 }; + enum { Alignment_LessEqual_16Bytes = Alignment <= 16 ? 1 : 0 }; + }; /// alignof - A templated function that returns the mininum alignment of |