From 10dae300498867a7ee5ff4be741eb0b869b31bdc Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 17 Apr 2009 17:46:19 +0000 Subject: Fix rdar://6800926 - crash compiling non-fragile _Bool bitfield ivar, the functional change here is changing ConvertType -> ConvertTypeForMem so that we handle i1 fields properly as memory. llvm-svn: 69361 --- clang/test/CodeGenObjC/ivars.m | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 clang/test/CodeGenObjC/ivars.m (limited to 'clang/test/CodeGenObjC/ivars.m') diff --git a/clang/test/CodeGenObjC/ivars.m b/clang/test/CodeGenObjC/ivars.m new file mode 100644 index 00000000000..327b628532e --- /dev/null +++ b/clang/test/CodeGenObjC/ivars.m @@ -0,0 +1,14 @@ +// RUN: clang-cc -triple x86_64-apple-darwin9 -emit-llvm -o - %s && +// RUN: clang-cc -triple i386-apple-darwin9 -emit-llvm -o - %s + +// rdar://6800926 +@interface ITF { +@public + unsigned field :1 ; + _Bool boolfield :1 ; +} +@end + +void foo(ITF *P) { + P->boolfield = 1; +} -- cgit v1.2.3