[llvm-commits] [llvm] r70233 - /llvm/trunk/test/FrontendObjC/2009-04-27-bitfield-vs-ivar.m

Dale Johannesen dalej at apple.com
Mon Apr 27 12:15:09 PDT 2009


Author: johannes
Date: Mon Apr 27 14:15:09 2009
New Revision: 70233

URL: http://llvm.org/viewvc/llvm-project?rev=70233&view=rev
Log:
Test for (llvm-gcc) 70231.


Added:
    llvm/trunk/test/FrontendObjC/2009-04-27-bitfield-vs-ivar.m

Added: llvm/trunk/test/FrontendObjC/2009-04-27-bitfield-vs-ivar.m
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendObjC/2009-04-27-bitfield-vs-ivar.m?rev=70233&view=auto

==============================================================================
--- llvm/trunk/test/FrontendObjC/2009-04-27-bitfield-vs-ivar.m (added)
+++ llvm/trunk/test/FrontendObjC/2009-04-27-bitfield-vs-ivar.m Mon Apr 27 14:15:09 2009
@@ -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
+ at interface I3 {
+  unsigned int _iv2 :1;
+}
+ at end
+
+ at interface I4 : I3 {
+  char _iv4;
+}
+ at end
+
+// Test case with no instance variables in derived class
+ at interface I1 {
+  unsigned int _iv2 :1;
+}
+ at end
+
+ at interface I2 : I1 {
+}
+ at end
+
+// Test case with no instance variables anywhere
+ at interface I6 {
+}
+ at end
+
+ at interface I5 : I6 {
+}
+ at end
+
+ at implementation I4
+ at end
+
+ at implementation I2
+ at end
+
+ at implementation I5
+ at end





More information about the llvm-commits mailing list