diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2015-12-12 22:41:31 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2015-12-12 21:41:31 +0000 |
commit | b8e99d033082f69bc672ada056cb9676a8b6cf64 (patch) | |
tree | 7e6fb11308092ab2f1f3c5ae6c1b8ddc859e0ae8 /gcc/dwarf2out.c | |
parent | 425112c8e1a1c0025320c079e7a5d94dcda5ee20 (diff) | |
download | gcc-b8e99d033082f69bc672ada056cb9676a8b6cf64.zip gcc-b8e99d033082f69bc672ada056cb9676a8b6cf64.tar.gz gcc-b8e99d033082f69bc672ada056cb9676a8b6cf64.tar.bz2 |
tree.c (free_lang_data_in_type, [...]): Also free unnecesary type decls.
* tree.c (free_lang_data_in_type, find_decls_types_r): Also free
unnecesary type decls.
* tree.h (is_redundant_typedef): Declare.
* dwarf2out.c (is_redundant_typedef): Export; booleanize
From-SVN: r231588
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 6af57b5..fe5cab5 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -3319,7 +3319,6 @@ static void gen_typedef_die (tree, dw_die_ref); static void gen_type_die (tree, dw_die_ref); static void gen_block_die (tree, dw_die_ref); static void decls_for_scope (tree, dw_die_ref); -static inline int is_redundant_typedef (const_tree); static bool is_naming_typedef_decl (const_tree); static inline dw_die_ref get_context_die (tree); static void gen_namespace_die (tree, dw_die_ref); @@ -21117,11 +21116,11 @@ decls_for_scope (tree stmt, dw_die_ref context_die) /* Is this a typedef we can avoid emitting? */ -static inline int +bool is_redundant_typedef (const_tree decl) { if (TYPE_DECL_IS_STUB (decl)) - return 1; + return true; if (DECL_ARTIFICIAL (decl) && DECL_CONTEXT (decl) @@ -21129,9 +21128,9 @@ is_redundant_typedef (const_tree decl) && TREE_CODE (TYPE_NAME (DECL_CONTEXT (decl))) == TYPE_DECL && DECL_NAME (decl) == DECL_NAME (TYPE_NAME (DECL_CONTEXT (decl)))) /* Also ignore the artificial member typedef for the class name. */ - return 1; + return true; - return 0; + return false; } /* Return TRUE if TYPE is a typedef that names a type for linkage |