Rafael Espindola | a3f55b0 | 2013-09-04 04:12:25 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fblocks -fobjc-arc -fobjc-runtime-has-weak -g -triple x86_64-apple-darwin -emit-llvm %s -o - | FileCheck %s |
Adrian Prantl | 334ded9 | 2013-07-22 23:44:26 +0000 | [diff] [blame] | 2 | |
Adrian Prantl | d60911a | 2013-07-24 20:34:34 +0000 | [diff] [blame] | 3 | // rdar://problem/14386148 |
Adrian Prantl | 334ded9 | 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: |
Pirama Arumuga Nainar | 3ea9e33 | 2015-04-08 08:57:32 -0700 | [diff] [blame] | 6 | // CHECK: !MDDerivedType(tag: DW_TAG_member, name: "foo", |
| 7 | // CHECK-NOT: line: |
| 8 | // CHECK-SAME: align: 64 |
| 9 | // CHECK-SAME: offset: 256 |
Adrian Prantl | 334ded9 | 2013-07-22 23:44:26 +0000 | [diff] [blame] | 10 | |
David Blaikie | 683a37b | 2013-07-23 01:01:17 +0000 | [diff] [blame] | 11 | struct Foo { |
| 12 | unsigned char *data; |
| 13 | }; |
| 14 | int func() { |
| 15 | __attribute__((__blocks__(byref))) struct Foo foo; |
Adrian Prantl | 334ded9 | 2013-07-22 23:44:26 +0000 | [diff] [blame] | 16 | return 0; |
| 17 | } |