blob: 3ddb376dde65ec426e0b525dc54f61d18abcbd44 [file] [log] [blame]
Douglas Katzman3459ce22015-10-08 04:24:12 +00001// RUN: %clang_cc1 -fblocks -fobjc-arc -fobjc-runtime-has-weak -debug-info-kind=limited -triple x86_64-apple-darwin -emit-llvm %s -o - | FileCheck %s
Adrian Prantl52f5b252013-07-22 23:44:26 +00002
Adrian Prantld8017112013-07-24 20:34:34 +00003// rdar://problem/14386148
Adrian Prantl52f5b252013-07-22 23:44:26 +00004// Test that the foo is aligned at an 8 byte boundary in the DWARF
5// expression (256) that locates it inside of the byref descriptor:
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +00006// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "foo",
Duncan P. N. Exon Smithf04be1f2015-03-03 17:25:55 +00007// CHECK-NOT: line:
Duncan P. N. Exon Smithf04be1f2015-03-03 17:25:55 +00008// CHECK-SAME: offset: 256
Adrian Prantl52f5b252013-07-22 23:44:26 +00009
David Blaikie613c69502013-07-23 01:01:17 +000010struct Foo {
11 unsigned char *data;
12};
13int func() {
14 __attribute__((__blocks__(byref))) struct Foo foo;
Adrian Prantl52f5b252013-07-22 23:44:26 +000015 return 0;
16}