Mercurial > hg > CbC > CbC_llvm
comparison clang/test/CodeGenObjC/block-byref-debuginfo.m @ 150:1d019706d866
LLVM10
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 15:10:13 +0900 |
parents | |
children | 5f17cb93ff66 |
comparison
equal
deleted
inserted
replaced
147:c2174574ed3a | 150:1d019706d866 |
---|---|
1 // RUN: %clang_cc1 -fblocks -fobjc-arc -fobjc-runtime-has-weak -debug-info-kind=limited -triple x86_64-apple-darwin -emit-llvm %s -o - | FileCheck %s | |
2 | |
3 // CHECK: !DILocalVariable(name: "foo", {{.*}}type: ![[FOOTY:[0-9]+]]) | |
4 // CHECK: ![[FOOTY]] = {{.*}}!DICompositeType({{.*}}, name: "Foo" | |
5 | |
6 // CHECK-NOT: DIFlagBlockByrefStruct | |
7 // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "__block_literal_1", | |
8 // CHECK-SAME: size: 320, elements: ![[BL_ELTS:[0-9]+]]) | |
9 // CHECK: ![[BL_ELTS]] = !{{.*}}![[WFOO:[0-9]+]]} | |
10 | |
11 // Test that the foo is aligned at an 8 byte boundary in the DWARF | |
12 // expression (256) that locates it inside of the byref descriptor: | |
13 // CHECK: ![[WFOO]] = !DIDerivedType(tag: DW_TAG_member, name: "foo", | |
14 // CHECK-SAME: baseType: ![[PTR:[0-9]+]] | |
15 // CHECK-SAME: offset: 256) | |
16 | |
17 // CHECK: ![[PTR]] = !DIDerivedType(tag: DW_TAG_pointer_type, | |
18 // CHECK-SAME: baseType: ![[WRAPPER:[0-9]+]] | |
19 // CHECK: ![[WRAPPER]] = !DICompositeType(tag: DW_TAG_structure_type, scope: | |
20 // CHECK: elements: ![[WR_ELTS:[0-9]+]]) | |
21 // CHECK: ![[WR_ELTS]] = !{{.*}}![[WFOO:[0-9]+]]} | |
22 // CHECK: ![[WFOO]] = !DIDerivedType(tag: DW_TAG_member, name: "foo", | |
23 // CHECK-SAME: baseType: ![[FOOTY]] | |
24 | |
25 // CHECK: !DILocalVariable(name: "foo", {{.*}}type: ![[FOOTY]]) | |
26 | |
27 | |
28 struct Foo { | |
29 unsigned char *data; | |
30 }; | |
31 int func() { | |
32 __attribute__((__blocks__(byref))) struct Foo foo; | |
33 ^{ foo.data = 0; }(); | |
34 return 0; | |
35 } |