diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-12-18 00:48:56 +0000 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-12-18 00:48:56 +0000 |
| commit | c8ee63e2d08700865b304d4d867573535a069fc6 (patch) | |
| tree | 4e21d12f352c8d967f9cce12fb8ac6fddff900c4 /clang/test | |
| parent | 97f07c2778d5a82bae0418e1f05f44baa388c046 (diff) | |
| download | bcm5719-llvm-c8ee63e2d08700865b304d4d867573535a069fc6.tar.gz bcm5719-llvm-c8ee63e2d08700865b304d4d867573535a069fc6.zip | |
CGDebugInfo: Use DIBuilder API for self-referencing DICompositeTypes
Use new `DIBuilder` API from LLVM r224482 to mutate `DICompositeType`s,
rather than changing them directly. This allows `DIBuilder` to track
otherwise orphaned cycles when `CollectContainingType()` creates a
self-reference.
Fixes PR21941.
llvm-svn: 224483
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/CodeGenCXX/vtable-holder-self-reference.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/vtable-holder-self-reference.cpp b/clang/test/CodeGenCXX/vtable-holder-self-reference.cpp new file mode 100644 index 00000000000..d311ea65942 --- /dev/null +++ b/clang/test/CodeGenCXX/vtable-holder-self-reference.cpp @@ -0,0 +1,15 @@ +// RUN: %clang_cc1 -emit-llvm -gdwarf-2 -x c++ -o - %s | FileCheck %s +// +// PR21941: crasher for self-referencing DW_TAG_structure_type node. If we get +// rid of self-referenceing structure_types (PR21902), then it should be safe +// to just kill this test. +// +// CHECK: ![[SELF:[0-9]+]] = !{!"0x13\00B\00{{[^"]*}}", {{[^,]+}}, {{[^,]+}}, {{[^,]+}}, {{[^,]+}}, ![[SELF]], {{[^}]+}}} ; [ DW_TAG_structure_type ] [B] + +void foo() { + struct V { + int vi; + }; + struct B : virtual V {}; + B b; +} |

