// 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) {
}

Add a testcase that exercises DIBuilder's handling of cyclic debug info nodes.
Add a testcase that exercises DIBuilder's handling of cyclic debug info nodes.

rdar://problem/19839612

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@229522 91177308-0d34-0410-b5e6-96231b3b80d8
