From 58efeec845405bfa4bc9c3587815f331e17d7417 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Tue, 17 Feb 2015 19:17:56 +0000 Subject: [PATCH] Add a testcase that exercises DIBuilder's handling of cyclic debug info nodes. rdar://problem/19839612 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@229522 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGenObjCXX/debug-info-cyclic.mm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/CodeGenObjCXX/debug-info-cyclic.mm diff --git a/test/CodeGenObjCXX/debug-info-cyclic.mm b/test/CodeGenObjCXX/debug-info-cyclic.mm new file mode 100644 index 0000000000..8fd83a55f8 --- /dev/null +++ b/test/CodeGenObjCXX/debug-info-cyclic.mm @@ -0,0 +1,21 @@ +// RUN: %clang_cc1 -triple x86_64-apple-darwin -g -emit-llvm %s -o - | FileCheck %s + +// CHECK: ![[B:.*]] = {{.*}}, null, null, ![[BMEMBERS:.*]], null, null, null} ; [ DW_TAG_structure_type ] [B] [line [[@LINE+1]], size 8, align 8, offset 0] [def] [from ] +struct B { + B(struct A *); +// CHECK: ![[BMEMBERS]] = !{![[BB:.*]]} +// CHECK: ![[BB]] = {{.*}} ![[B]], ![[TY:[0-9]+]], {{.*}}} ; [ DW_TAG_subprogram ] [line [[@LINE-2]]] [B] +// CHECK: ![[TY]] = {{.*}} ![[ARGS:[0-9]+]], null, null, null} ; [ DW_TAG_subroutine_type ] +// CHECK: ![[ARGS]] = !{null, ![[THIS:[0-9]+]], +// CHECK: ![[THIS]] = {{.*}}[[B]]} ; [ DW_TAG_pointer_type ] [ +}; + +struct C { + B b; + C(struct A *); + virtual ~C(); +}; + +C::C(struct A *a) + : b(a) { +} -- 2.40.0