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

Adrian Prantl aprantl at apple.com
Tue Feb 17 11:17:56 PST 2015


Author: adrian
Date: Tue Feb 17 13:17:56 2015
New Revision: 229522

URL: http://llvm.org/viewvc/llvm-project?rev=229522&view=rev
Log:
Add a testcase that exercises DIBuilder's handling of cyclic debug info nodes.

rdar://problem/19839612

Added:
    cfe/trunk/test/CodeGenObjCXX/debug-info-cyclic.mm

Added: cfe/trunk/test/CodeGenObjCXX/debug-info-cyclic.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/debug-info-cyclic.mm?rev=229522&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/debug-info-cyclic.mm (added)
+++ cfe/trunk/test/CodeGenObjCXX/debug-info-cyclic.mm Tue Feb 17 13:17:56 2015
@@ -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) {
+}





More information about the cfe-commits mailing list