Patchwork final.c: make debug_prefix_maps static

login
register
mail settings
Submitter David Malcolm
Date June 11, 2013, 2:57 p.m.
Message ID <1370962668.28429.7.camel@surprise>
Download mbox | patch
Permalink /patch/250559/
State New
Headers show

Comments

David Malcolm - June 11, 2013, 2:57 p.m.
Usage of "debug_prefix_maps" is hidden behind an API, with the only
direct uses of the ptr being within final.c.  Indeed the declaration of
its type is local to that file.

Hence it can be made static.

Successfully bootstrapped on x86_64-unknown-linux-gnu

OK for trunk?

2013-06-11  David Malcolm  <dmalcolm@redhat.com>

	* final.c (debug_prefix_maps): Make static.
Richard Henderson - June 11, 2013, 4:34 p.m.
On 06/11/2013 07:57 AM, David Malcolm wrote:
> Usage of "debug_prefix_maps" is hidden behind an API, with the only
> direct uses of the ptr being within final.c.  Indeed the declaration of
> its type is local to that file.
> 
> Hence it can be made static.
> 
> Successfully bootstrapped on x86_64-unknown-linux-gnu
> 
> OK for trunk?
> 
> 2013-06-11  David Malcolm  <dmalcolm@redhat.com>
> 
> 	* final.c (debug_prefix_maps): Make static.
> 

Ok.


r~
David Malcolm - June 11, 2013, 5:18 p.m.
On Tue, 2013-06-11 at 09:34 -0700, Richard Henderson wrote:
> On 06/11/2013 07:57 AM, David Malcolm wrote:
> > Usage of "debug_prefix_maps" is hidden behind an API, with the only
> > direct uses of the ptr being within final.c.  Indeed the declaration of
> > its type is local to that file.
> > 
> > Hence it can be made static.
> > 
> > Successfully bootstrapped on x86_64-unknown-linux-gnu
> > 
> > OK for trunk?
> > 
> > 2013-06-11  David Malcolm  <dmalcolm@redhat.com>
> > 
> > 	* final.c (debug_prefix_maps): Make static.
> > 
> 
> Ok.
Thanks; committed to svn trunk as r199963.

Patch

Index: gcc/final.c
===================================================================
--- gcc/final.c	(revision 199957)
+++ gcc/final.c	(working copy)
@@ -1471,7 +1471,7 @@ 
 } debug_prefix_map;
 
 /* Linked list of such structures.  */
-debug_prefix_map *debug_prefix_maps;
+static debug_prefix_map *debug_prefix_maps;
 
 
 /* Record a debug file prefix mapping.  ARG is the argument to