Douglas Katzman | 3459ce2 | 2015-10-08 04:24:12 +0000 | [diff] [blame] | 1 | // 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 Prantl | 52f5b25 | 2013-07-22 23:44:26 +0000 | [diff] [blame] | 2 | |
Adrian Prantl | d801711 | 2013-07-24 20:34:34 +0000 | [diff] [blame] | 3 | // rdar://problem/14386148 |
Adrian Prantl | 52f5b25 | 2013-07-22 23:44:26 +0000 | [diff] [blame] | 4 | // 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 Smith | 9dd4e4e | 2015-04-29 16:40:08 +0000 | [diff] [blame] | 6 | // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "foo", |
Duncan P. N. Exon Smith | f04be1f | 2015-03-03 17:25:55 +0000 | [diff] [blame] | 7 | // CHECK-NOT: line: |
Duncan P. N. Exon Smith | f04be1f | 2015-03-03 17:25:55 +0000 | [diff] [blame] | 8 | // CHECK-SAME: offset: 256 |
Adrian Prantl | 52f5b25 | 2013-07-22 23:44:26 +0000 | [diff] [blame] | 9 | |
David Blaikie | 613c6950 | 2013-07-23 01:01:17 +0000 | [diff] [blame] | 10 | struct Foo { |
| 11 | unsigned char *data; |
| 12 | }; |
| 13 | int func() { |
| 14 | __attribute__((__blocks__(byref))) struct Foo foo; |
Adrian Prantl | 52f5b25 | 2013-07-22 23:44:26 +0000 | [diff] [blame] | 15 | return 0; |
| 16 | } |