[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / CodeGenObjCXX / debug-info-cyclic.mm
blob2fb1611c904d0626ac954af2365526d8d313bd64
1 // RUN: %clang_cc1 -triple x86_64-apple-darwin -debug-info-kind=standalone -emit-llvm %s -o - | FileCheck %s
3 struct B {
4 // CHECK: ![[B:[0-9]+]] ={{.*}}!DICompositeType(tag: DW_TAG_structure_type, name: "B"
5 // CHECK-SAME:                             line: [[@LINE-2]],
6 // CHECK-SAME:                             size: 8,
7 // CHECK-NOT:                              offset:
8 // CHECK-NOT:                              DIFlagFwdDecl
9 // CHECK-SAME:                             elements: ![[BMEMBERS:[0-9]+]]
10 // CHECK-SAME:                             identifier:
11 // CHECK: ![[BMEMBERS]] = !{![[BB:[0-9]+]]}
12   B(struct A *);
13 // CHECK: ![[BB]] = !DISubprogram(name: "B", scope: ![[B]]
14 // CHECK-SAME:                    line: [[@LINE-2]],
15 // CHECK-SAME:                    type: ![[TY:[0-9]+]],
16 // CHECK: ![[TY]] = !DISubroutineType(types: ![[ARGS:[0-9]+]])
17 // CHECK: ![[ARGS]] = !{null, ![[THIS:[0-9]+]], !{{[^,]+}}}
18 // CHECK: ![[THIS]] = !DIDerivedType(tag: DW_TAG_pointer_type,
19 // CHECK-SAME:                       baseType: ![[B]]
22 struct C {
23  B b;
24  C(struct A *);
25  virtual ~C();
28 C::C(struct A *a)
29   : b(a) {