1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -emit-llvm -gdwarf-2 -x c++ -o - %s | FileCheck %s
2*0a6a1f1dSLionel Sambuc //
3*0a6a1f1dSLionel Sambuc // PR21941: crasher for self-referencing DW_TAG_structure_type node. If we get
4*0a6a1f1dSLionel Sambuc // rid of self-referenceing structure_types (PR21902), then it should be safe
5*0a6a1f1dSLionel Sambuc // to just kill this test.
6*0a6a1f1dSLionel Sambuc //
7*0a6a1f1dSLionel Sambuc // CHECK: ![[SELF:[0-9]+]] = distinct !{!"0x13\00B\00{{[^"]*}}", {{[^,]+}}, {{[^,]+}}, {{[^,]+}}, {{[^,]+}}, ![[SELF]], {{[^}]+}}} ; [ DW_TAG_structure_type ] [B]
8*0a6a1f1dSLionel Sambuc
foo()9*0a6a1f1dSLionel Sambuc void foo() {
10*0a6a1f1dSLionel Sambuc struct V {
11*0a6a1f1dSLionel Sambuc int vi;
12*0a6a1f1dSLionel Sambuc };
13*0a6a1f1dSLionel Sambuc struct B : virtual V {};
14*0a6a1f1dSLionel Sambuc B b;
15*0a6a1f1dSLionel Sambuc }
16