mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-10 18:37:01 +00:00
Add more alignment enums.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50363 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c9715624fa
commit
9d695d5f7d
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user