diff options
author | David Blaikie <dblaikie@gmail.com> | 2013-08-18 16:55:33 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2013-08-18 16:55:33 +0000 |
commit | adfbf993d6068a9196ed1036a9039a8cb566b3d2 (patch) | |
tree | ac19232fbc2186b37780c23cda1bc916eb2adac7 /clang/test/CodeGenCXX/debug-info-class.cpp | |
parent | c96c699a1673c5704a3e994627b18e26850b01c9 (diff) | |
download | bcm5719-llvm-adfbf993d6068a9196ed1036a9039a8cb566b3d2.tar.gz bcm5719-llvm-adfbf993d6068a9196ed1036a9039a8cb566b3d2.zip |
DebugInfo: Don't emit vbase 'containing types' for context chain limited types
Possible minor reduction in debug info & avoid some cases where creating
a context chain could lead to the type the context chain is being
created for, being created. (this is still possible with template
parameters - tests/fixes/improvements to follow)
llvm-svn: 188639
Diffstat (limited to 'clang/test/CodeGenCXX/debug-info-class.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/debug-info-class.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/clang/test/CodeGenCXX/debug-info-class.cpp b/clang/test/CodeGenCXX/debug-info-class.cpp index df2492603e3..0a337dc05d8 100644 --- a/clang/test/CodeGenCXX/debug-info-class.cpp +++ b/clang/test/CodeGenCXX/debug-info-class.cpp @@ -12,6 +12,14 @@ class B { public: virtual ~B(); }; + +struct C { + virtual void func(); + struct inner { + int j; + }; +}; + struct A { int one; static const int HdrSize = 52; @@ -24,6 +32,7 @@ struct A { int main(int argc, char **argv) { B b; + C::inner c_i; if (argc) { A a; } @@ -44,5 +53,11 @@ int main(int argc, char **argv) { // CHECK: HdrSize // CHECK: DW_TAG_class_type ] [B] // CHECK: metadata !"_vptr$B", {{.*}}, i32 64, metadata !{{.*}}} ; [ DW_TAG_member ] -// CHECK: ![[EXCEPTLOC]] = metadata !{i32 31, -// CHECK: ![[RETLOC]] = metadata !{i32 30, +// CHECK: metadata [[C_INNER_MEM:![0-9]*]], i32 0, null, null} ; [ DW_TAG_structure_type ] [inner] {{.*}} [def] +// Context chains (in Clang -flimit-debug-info and in GCC generally) contain +// definitions without members (& without a vbase 'containing type'): +// CHECK: null, i32 0, null, null} ; [ DW_TAG_structure_type ] [C] {{.*}} [def] +// CHECK: [[C_INNER_MEM]] = metadata !{metadata [[C_INNER_I:![0-9]*]]} +// CHECK: [[C_INNER_I]] = {{.*}} ; [ DW_TAG_member ] [j] {{.*}} [from int] +// CHECK: ![[EXCEPTLOC]] = metadata !{i32 40, +// CHECK: ![[RETLOC]] = metadata !{i32 39, |