From 45cfaf9903d3f5aa916d330f2013eb7d820a7137 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Fri, 27 Mar 2020 13:57:42 +0100 Subject: 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 PR debug/94273 * dwarf2out.c (should_emit_struct_debug): Return false for DINFO_LEVEL_TERSE. * g++.dg/debug/pr94273.C: New testcase. --- gcc/dwarf2out.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc/dwarf2out.c') diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index b1fa6f5..378a273 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -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); -- cgit v1.1