llvm.org GIT mirror llvm / 9d695d5
Add more alignment enums. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50363 91177308-0d34-0410-b5e6-96231b3b80d8 Ted Kremenek 12 years ago
1 changed file(s) with 7 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
3434 template
3535 struct AlignOf {
3636 enum { Alignment = sizeof(AlignmentCalcImpl) - sizeof(T) };
37
3738 enum { Alignment_GreaterEqual_2Bytes = Alignment >= 2 ? 1 : 0 };
3839 enum { Alignment_GreaterEqual_4Bytes = Alignment >= 4 ? 1 : 0 };
3940 enum { Alignment_GreaterEqual_8Bytes = Alignment >= 8 ? 1 : 0 };
4041 enum { Alignment_GreaterEqual_16Bytes = Alignment >= 16 ? 1 : 0 };
42
43 enum { Alignment_LessEqual_2Bytes = Alignment <= 2 ? 1 : 0 };
44 enum { Alignment_LessEqual_4Bytes = Alignment <= 4 ? 1 : 0 };
45 enum { Alignment_LessEqual_8Bytes = Alignment <= 8 ? 1 : 0 };
46 enum { Alignment_LessEqual_16Bytes = Alignment <= 16 ? 1 : 0 };
47
4148 };
4249
4350 /// alignof - A templated function that returns the mininum alignment of