Adrian Prantl | 2526fca | 2016-04-18 23:48:16 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++14 -fblocks -debug-info-kind=standalone -emit-llvm %s -o - | FileCheck %s |
| 2 | struct test |
| 3 | { |
| 4 | int func() { return 1; } |
| 5 | int (^block)() = ^{ return func(); }; |
| 6 | }; |
| 7 | |
| 8 | int main(int argc, const char * argv[]) { |
| 9 | test t; |
| 10 | return t.block(); |
| 11 | } |
| 12 | |
Duncan P. N. Exon Smith | 383f841 | 2016-04-23 21:08:27 +0000 | [diff] [blame] | 13 | // CHECK: ![[TESTCT:[0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "test" |
Adrian Prantl | 2526fca | 2016-04-18 23:48:16 +0000 | [diff] [blame] | 14 | // 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 Smith | 383f841 | 2016-04-23 21:08:27 +0000 | [diff] [blame] | 18 | // CHECK-SAME: baseType: ![[TESTCT]], |
Adrian Prantl | 2526fca | 2016-04-18 23:48:16 +0000 | [diff] [blame] | 19 | |
| 20 | |