From f4290962f769d655fb6fbdbe4d54cee5f0b56658 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Tue, 21 Aug 2018 14:32:53 +0200 Subject: [PATCH] tree.c (find_decls_types_r): Do not check for redundant typedefs. * tree.c (find_decls_types_r): Do not check for redundant typedefs. * tree.h (is_redundant_typedef): Remove. * dwarf2out.c (is_redundant_typedef): Turn into static function. From-SVN: r263699 --- gcc/ChangeLog | 6 ++++++ gcc/dwarf2out.c | 3 ++- gcc/tree.c | 6 +----- gcc/tree.h | 1 - 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c19038b..c856a93 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2018-08-21 Jan Hubicka + * tree.c (find_decls_types_r): Do not check for redundant typedefs. + * tree.h (is_redundant_typedef): Remove. + * dwarf2out.c (is_redundant_typedef): Turn into static function. + +2018-08-21 Jan Hubicka + * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT when possible. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index fb71ff3..edf1ac3 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -102,6 +102,7 @@ static void dwarf2out_source_line (unsigned int, unsigned int, const char *, static rtx_insn *last_var_location_insn; static rtx_insn *cached_next_real_insn; static void dwarf2out_decl (tree); +static bool is_redundant_typedef (const_tree); #ifndef XCOFF_DEBUGGING_INFO #define XCOFF_DEBUGGING_INFO 0 @@ -25831,7 +25832,7 @@ decls_for_scope (tree stmt, dw_die_ref context_die) /* Is this a typedef we can avoid emitting? */ -bool +static bool is_redundant_typedef (const_tree decl) { if (TYPE_DECL_IS_STUB (decl)) diff --git a/gcc/tree.c b/gcc/tree.c index 8d1e010..f00a519 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -5565,11 +5565,7 @@ find_decls_types_r (tree *tp, int *ws, void *data) tem = TYPE_FIELDS (t); while (tem) { - if (TREE_CODE (tem) == FIELD_DECL - || (TREE_CODE (tem) == TYPE_DECL - && !DECL_IGNORED_P (tem) - && debug_info_level > DINFO_LEVEL_TERSE - && !is_redundant_typedef (tem))) + if (TREE_CODE (tem) == FIELD_DECL) fld_worklist_push (tem, fld); tem = TREE_CHAIN (tem); } diff --git a/gcc/tree.h b/gcc/tree.h index 648e9e2..5d4f034 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -5805,7 +5805,6 @@ extern void gt_pch_nx (tree &); extern void gt_pch_nx (tree &, gt_pointer_operator, void *); extern bool nonnull_arg_p (const_tree); -extern bool is_redundant_typedef (const_tree); extern bool default_is_empty_record (const_tree); extern HOST_WIDE_INT arg_int_size_in_bytes (const_tree); extern tree arg_size_in_bytes (const_tree); -- 2.7.4