diff mbox

remove dwarf2out's current_function_has_inlines

Message ID 54341FEC.9080201@redhat.com
State New
Headers show

Commit Message

Aldy Hernandez Oct. 7, 2014, 5:16 p.m. UTC
Errr... a static that only gets written to?

OK to commit?
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.

Comments

Jason Merrill Oct. 7, 2014, 5:55 p.m. UTC | #1
On 10/07/2014 01:16 PM, Aldy Hernandez wrote:
> Errr... a static that only gets written to?
>
> OK to commit?

Yes.  This should have been removed with

     2010-09-03  Marcin Baczynski  <marbacz@gmail.com>

         * dwarf2out.c (file scope): Remove #if0'd code.
         (gen_subprogram_die): Same.

Jason
diff mbox

Patch

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;
     }
 }