blob: dc8379bf852b6e4063a1065a6a5d6f93d66fa50d [file] [log] [blame]
Rafael Espindolaa3f55b02013-09-04 04:12:25 +00001// RUN: %clang_cc1 -fblocks -fobjc-arc -fobjc-runtime-has-weak -g -triple x86_64-apple-darwin -emit-llvm %s -o - | FileCheck %s
Adrian Prantl334ded92013-07-22 23:44:26 +00002
Adrian Prantld60911a2013-07-24 20:34:34 +00003// rdar://problem/14386148
Adrian Prantl334ded92013-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:
Pirama Arumuga Nainar3ea9e332015-04-08 08:57:32 -07006// CHECK: !MDDerivedType(tag: DW_TAG_member, name: "foo",
7// CHECK-NOT: line:
8// CHECK-SAME: align: 64
9// CHECK-SAME: offset: 256
Adrian Prantl334ded92013-07-22 23:44:26 +000010
David Blaikie683a37b2013-07-23 01:01:17 +000011struct Foo {
12 unsigned char *data;
13};
14int func() {
15 __attribute__((__blocks__(byref))) struct Foo foo;
Adrian Prantl334ded92013-07-22 23:44:26 +000016 return 0;
17}