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: |
| 6 | // CHECK: metadata !"foo", i32 0, i64 {{[0-9]+}}, i64 64, i64 256, i32 0, metadata |
| 7 | |
David Blaikie | 683a37b | 2013-07-23 01:01:17 +0000 | [diff] [blame] | 8 | struct Foo { |
| 9 | unsigned char *data; |
| 10 | }; |
| 11 | int func() { |
| 12 | __attribute__((__blocks__(byref))) struct Foo foo; |
Adrian Prantl | 334ded9 | 2013-07-22 23:44:26 +0000 | [diff] [blame] | 13 | return 0; |
| 14 | } |