diff options
author | Devang Patel <dpatel@apple.com> | 2007-12-11 00:49:18 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2007-12-11 00:49:18 +0000 |
commit | ab6aadb34a4e262d31a60b9805799f891714af60 (patch) | |
tree | 6c00532b18384f701adf5cdab3fa6c43d2be412b /clang/test/CodeGen/struct-x86-darwin.c | |
parent | 7843c16f311987c09eae5329a7d8825b5e81f80f (diff) | |
download | bcm5719-llvm-ab6aadb34a4e262d31a60b9805799f891714af60.tar.gz bcm5719-llvm-ab6aadb34a4e262d31a60b9805799f891714af60.zip |
Add support to share llvm fields for bit-fields.
For example, struct { char a; short b:2; };
llvm-svn: 44830
Diffstat (limited to 'clang/test/CodeGen/struct-x86-darwin.c')
-rw-r--r-- | clang/test/CodeGen/struct-x86-darwin.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/test/CodeGen/struct-x86-darwin.c b/clang/test/CodeGen/struct-x86-darwin.c index 1e34a955fd5..2fc959a6e04 100644 --- a/clang/test/CodeGen/struct-x86-darwin.c +++ b/clang/test/CodeGen/struct-x86-darwin.c @@ -3,7 +3,9 @@ // RUN: grep "STest2 = type { i16, i16, i32, i32 }" %t1 && // RUN: grep "STest3 = type { i8, i8, i16, i32 }" %t1 && // RUN: grep "STestB1 = type { i8, i8 }" %t1 && -// RUN: grep "STestB2 = type { i8, i8, i8 }" %t1 +// RUN: grep "STestB2 = type { i8, i8, i8 }" %t1 && +// RUN: grep "STestB3 = type { i8, i8 }" %t1 && +// RUN: grep "STestB4 = type { i8, i8, i8, i8 }" %t1 // Test struct layout for x86-darwin target // FIXME : Enable this test for x86-darwin only. At the moment clang hard codes // x86-darwin as the target @@ -14,7 +16,9 @@ struct STest3 {char a; short b; int c; } st3; // Bitfields struct STestB1 {char a; char b:2; } stb1; -struct STestB2 {char a; char b:5; char c:4} stb2; +struct STestB2 {char a; char b:5; char c:4; } stb2; +struct STestB3 {char a; char b:2; } stb3; +struct STestB4 {char a; short b:2; char c; } stb4; //struct STestB {int a:1; char b; int c:13 } stb; // Packed struct STestP1 {char a; short b; int c; } __attribute__((__packed__)) stp1; |