blob: 9464222b543b580d02fb442434b6cfb200b2404f [file] [log] [blame]
Adrian Prantl2526fca2016-04-18 23:48:16 +00001// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++14 -fblocks -debug-info-kind=standalone -emit-llvm %s -o - | FileCheck %s
2struct test
3{
4 int func() { return 1; }
5 int (^block)() = ^{ return func(); };
6};
7
8int main(int argc, const char * argv[]) {
9 test t;
10 return t.block();
11}
12
Duncan P. N. Exon Smith383f8412016-04-23 21:08:27 +000013// CHECK: ![[TESTCT:[0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "test"
Adrian Prantl2526fca2016-04-18 23:48:16 +000014// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "__block_literal_1",
15// CHECK-SAME: elements: ![[ELEMS:.*]])
16// CHECK: ![[ELEMS]] = !{{{.*}}, ![[THIS:[0-9]+]]}
17// CHECK: ![[THIS]] = !DIDerivedType(tag: DW_TAG_member, name: "this",
Duncan P. N. Exon Smith383f8412016-04-23 21:08:27 +000018// CHECK-SAME: baseType: ![[TESTCT]],
Adrian Prantl2526fca2016-04-18 23:48:16 +000019
20