debug/94273 - avoid creating type DIEs for DINFO_LEVEL_TERSE

This avoids completing types for DINFO_LEVEL_TERSE by using
the should_emit_struct_debug machinery.

2020-03-27  Richard Biener  <rguenther@suse.de>

	PR debug/94273
	* dwarf2out.c (should_emit_struct_debug): Return false for
	DINFO_LEVEL_TERSE.

	* g++.dg/debug/pr94273.C: New testcase.
This commit is contained in:
Richard Biener 2020-03-27 13:57:42 +01:00
parent 917e21e8bc
commit 45cfaf9903
4 changed files with 18 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2020-03-27 Richard Biener <rguenther@suse.de>
PR debug/94273
* dwarf2out.c (should_emit_struct_debug): Return false for
DINFO_LEVEL_TERSE.
2020-03-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/94352

View File

@ -399,6 +399,9 @@ get_full_len (const wide_int &op)
static bool
should_emit_struct_debug (tree type, enum debug_info_usage usage)
{
if (debug_info_level <= DINFO_LEVEL_TERSE)
return false;
enum debug_struct_file criterion;
tree type_decl;
bool generic = lang_hooks.types.generic_p (type);

View File

@ -1,3 +1,8 @@
2020-03-27 Richard Biener <rguenther@suse.de>
PR debug/94273
* g++.dg/debug/pr94273.C: New testcase.
2020-03-27 Tobias Burnus <tobias@codesourcery.com>
PR fortran/93957

View File

@ -0,0 +1,4 @@
class a {
virtual void c() {}
} extern b;
a b;