diff options
author | Dale Johannesen <dalej@apple.com> | 2009-04-27 19:15:09 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2009-04-27 19:15:09 +0000 |
commit | 48c255d7f864e95680f139118db60cde539b561a (patch) | |
tree | 13a3ce6ae4b6949014c0257df345df7c1febab0e /test/FrontendObjC | |
parent | 5f96943e01de3e1aac979454a9818ef6d79d2290 (diff) | |
download | external_llvm-48c255d7f864e95680f139118db60cde539b561a.zip external_llvm-48c255d7f864e95680f139118db60cde539b561a.tar.gz external_llvm-48c255d7f864e95680f139118db60cde539b561a.tar.bz2 |
Test for (llvm-gcc) 70231.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70233 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/FrontendObjC')
-rw-r--r-- | test/FrontendObjC/2009-04-27-bitfield-vs-ivar.m | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/test/FrontendObjC/2009-04-27-bitfield-vs-ivar.m b/test/FrontendObjC/2009-04-27-bitfield-vs-ivar.m new file mode 100644 index 0000000..f5a4309 --- /dev/null +++ b/test/FrontendObjC/2009-04-27-bitfield-vs-ivar.m @@ -0,0 +1,44 @@ +// RUN: %llvmgcc -S -x objective-c -m64 -fobjc-abi-version=2 %s -o %t +// RUN: grep {OBJC_CLASS_RO_\\\$_I4} %t | grep {i32 0, i32 1, i32 2, i32 0} +// RUN: grep {OBJC_CLASS_RO_\\\$_I2} %t | grep {i32 0, i32 1, i32 1, i32 0} +// RUN: grep {OBJC_CLASS_RO_\\\$_I5} %t | grep {i32 0, i32 0, i32 0, i32 0} +// XTARGETS: darwin + +// Test instance variable sizing when base class ends in bitfield +@interface I3 { + unsigned int _iv2 :1; +} +@end + +@interface I4 : I3 { + char _iv4; +} +@end + +// Test case with no instance variables in derived class +@interface I1 { + unsigned int _iv2 :1; +} +@end + +@interface I2 : I1 { +} +@end + +// Test case with no instance variables anywhere +@interface I6 { +} +@end + +@interface I5 : I6 { +} +@end + +@implementation I4 +@end + +@implementation I2 +@end + +@implementation I5 +@end |