[patch] remove dwarf2out's current_function_has_inlines

Aldy Hernandez aldyh@redhat.com
Tue Oct 7 17:16:00 GMT 2014


Errr... a static that only gets written to?

OK to commit?
-------------- next part --------------
commit 7b1c19385fd06d6a2d0844d453bf1c7683071440
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Tue Oct 7 10:14:02 2014 -0700

    	* dwarf2out.c: Remove current_function_has_inlines.
    	(gen_subprogram_die): Same.
    	(gen_inlined_subroutine_die): Same.

diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index b5fcfa4..1b30ea9 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -2954,9 +2954,6 @@ static GTY(()) unsigned int loclabel_num;
 /* Unique label counter for point-of-call tables.  */
 static GTY(()) unsigned int poc_label_num;
 
-/* Record whether the function being analyzed contains inlined functions.  */
-static int current_function_has_inlines;
-
 /* The last file entry emitted by maybe_emit_file().  */
 static GTY(()) struct dwarf_file_data * last_emitted_file;
 
@@ -18613,7 +18610,6 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
       if (DECL_NAME (DECL_RESULT (decl)))
 	gen_decl_die (DECL_RESULT (decl), NULL, subr_die);
 
-      current_function_has_inlines = 0;
       decls_for_scope (outer_scope, subr_die, 0);
 
       if (call_arg_locations && !dwarf_strict)
@@ -19270,7 +19266,6 @@ gen_inlined_subroutine_die (tree stmt, dw_die_ref context_die, int depth)
       add_call_src_coords_attributes (stmt, subr_die);
 
       decls_for_scope (stmt, subr_die, depth);
-      current_function_has_inlines = 1;
     }
 }
 


More information about the Gcc-patches mailing list