aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2020-03-27 13:57:42 +0100
committerRichard Biener <rguenther@suse.de>2020-03-27 14:00:43 +0100
commit45cfaf9903d3f5aa916d330f2013eb7d820a7137 (patch)
tree6e3c1c751c03776994edd86e8a48a8025855c6ea /gcc/dwarf2out.c
parent917e21e8bcddf5047ee0ced063fca412ad81ce7f (diff)
downloadgcc-45cfaf9903d3f5aa916d330f2013eb7d820a7137.zip
gcc-45cfaf9903d3f5aa916d330f2013eb7d820a7137.tar.gz
gcc-45cfaf9903d3f5aa916d330f2013eb7d820a7137.tar.bz2
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.
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c3
1 files changed, 3 insertions, 0 deletions
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);