This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: make record_pending_block static


I'm checking this in.

While reading through buildsym, I ran across this FIXME comment; and
then I noticed that record_pending_block is no longer used outside
buildsym.c.  This patch makes it static.

Tom

2012-03-12  Tom Tromey  <tromey@redhat.com>

	* buildsym.c (record_pending_block): Now static.
	* buildsym.h: (record_pending_block): Remove.

Index: buildsym.c
===================================================================
RCS file: /cvs/src/src/gdb/buildsym.c,v
retrieving revision 1.91
diff -u -r1.91 buildsym.c
--- buildsym.c	7 Feb 2012 04:48:18 -0000	1.91
+++ buildsym.c	12 Mar 2012 14:09:15 -0000
@@ -85,6 +85,10 @@
 
 
 static int compare_line_numbers (const void *ln1p, const void *ln2p);
+
+static void record_pending_block (struct objfile *objfile,
+				  struct block *block,
+				  struct pending_block *opblock);
 
 
 /* Initial sizes of data structures.  These are realloc'd larger if
@@ -400,7 +404,7 @@
    Allocate the pending block struct in the objfile_obstack to save
    time.  This wastes a little space.  FIXME: Is it worth it?  */
 
-void
+static void
 record_pending_block (struct objfile *objfile, struct block *block,
 		      struct pending_block *opblock)
 {
Index: buildsym.h
===================================================================
RCS file: /cvs/src/src/gdb/buildsym.h,v
retrieving revision 1.30
diff -u -r1.30 buildsym.h
--- buildsym.h	7 Feb 2012 04:48:18 -0000	1.30
+++ buildsym.h	12 Mar 2012 14:09:15 -0000
@@ -283,14 +283,6 @@
 
 extern void free_pending_blocks (void);
 
-/* FIXME: Note that this is used only in buildsym.c and dstread.c,
-   which should be fixed to not need direct access to
-   record_pending_block.  */
-
-extern void record_pending_block (struct objfile *objfile,
-				  struct block *block,
-				  struct pending_block *opblock);
-
 /* Record the name of the debug format in the current pending symbol
    table.  FORMAT must be a string with a lifetime at least as long as
    the symtab's objfile.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]