Don't emit ivar offsets for unnamed bit fields.
Also, added assertion that the field matches what would be looked up.
llvm-svn: 69572
diff --git a/clang/test/CodeGenObjC/bitfield-ivar-offsets.m b/clang/test/CodeGenObjC/bitfield-ivar-offsets.m
index 0078a8c..23a09a3 100644
--- a/clang/test/CodeGenObjC/bitfield-ivar-offsets.m
+++ b/clang/test/CodeGenObjC/bitfield-ivar-offsets.m
@@ -1,3 +1,4 @@
+// RUNX: llvm-gcc -m64 -emit-llvm -S -o %t %s &&
// RUN: clang-cc -triple x86_64-apple-darwin10 -emit-llvm -o %t %s &&
// RUN: grep -F '@"OBJC_IVAR_$_I0._b0" = global i64 0, section "__DATA, __objc_const", align 8' %t &&
// RUN: grep -F '@"OBJC_IVAR_$_I0._b1" = global i64 0, section "__DATA, __objc_const", align 8' %t &&
@@ -6,6 +7,7 @@
// RUN: grep -F '@"OBJC_IVAR_$_I0._b3" = global i64 4, section "__DATA, __objc_const", align 8' %t &&
// RUN: grep -F '@"OBJC_IVAR_$_I0._y" = global i64 6, section "__DATA, __objc_const", align 8' %t &&
// RUN: grep -F '@"OBJC_IVAR_$_I0._b4" = global i64 7, section "__DATA, __objc_const", align 8' %t &&
+// RUN: grep -F '@"OBJC_IVAR_$_I0." = global' %t | count 0 &&
// RUN: true
@interface I0 {
@@ -16,6 +18,7 @@
unsigned _b3:9;
char _y;
char _b4:3;
+ char : 0;
}
@end