This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: unify line number handling patch 1
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: Gabriel Dos Reis <gdr at integrable-solutions dot net>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 01 May 2003 14:48:35 +0100
- Subject: Re: unify line number handling patch 1
- Organization: Codesourcery LLC
- References: <3EB017BA.5050102@codesourcery.com> <m3he8fdd6l.fsf@uniton.integrable-solutions.net> <87smrzahsg.fsf@egil.codesourcery.com>
Zack Weinberg wrote:
I pre-approve two patches: one that renames all the local variables
named 'input_filename' or 'input_line' and does nothing else, and
another that renames the 'lineno' global to 'input_line' and does
nothing else. Put those in, then come back with the substantial
changes.
here's the remove input_filename parameter names patch
tested on i686-pc-linux-gnu, installed
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
The voices in my head said this was stupid too
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
2003-04-29 Nathan Sidwell <nathan@codesourcery.com>
* dwarf2out.c (dwarf2out_init, dwarf2out_finish): Change parameter
name from input_filename.
f
* ste.c (struct gbe_block): Rename field from input_filename.
(ffeste_start_block_, ffeste_start_stmt_): Likewise.
Index: dwarf2out.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dwarf2out.c,v
retrieving revision 1.423
diff -c -3 -p -r1.423 dwarf2out.c
*** dwarf2out.c 29 Apr 2003 20:42:55 -0000 1.423
--- dwarf2out.c 30 Apr 2003 16:22:36 -0000
*************** dwarf2out_undef (lineno, buffer)
*** 12761,12768 ****
/* Set up for Dwarf output at the start of compilation. */
static void
! dwarf2out_init (input_filename)
! const char *input_filename ATTRIBUTE_UNUSED;
{
init_file_table ();
--- 12761,12768 ----
/* Set up for Dwarf output at the start of compilation. */
static void
! dwarf2out_init (filename)
! const char *filename ATTRIBUTE_UNUSED;
{
init_file_table ();
*************** prune_unused_types ()
*** 13068,13083 ****
and generate the DWARF-2 debugging info. */
static void
! dwarf2out_finish (input_filename)
! const char *input_filename;
{
limbo_die_node *node, *next_node;
dw_die_ref die = 0;
/* Add the name for the main input file now. We delayed this from
dwarf2out_init to avoid complications with PCH. */
! add_name_attribute (comp_unit_die, input_filename);
! if (input_filename[0] != DIR_SEPARATOR)
add_comp_dir_attribute (comp_unit_die);
else if (get_AT (comp_unit_die, DW_AT_comp_dir) == NULL)
{
--- 13068,13083 ----
and generate the DWARF-2 debugging info. */
static void
! dwarf2out_finish (filename)
! const char *filename;
{
limbo_die_node *node, *next_node;
dw_die_ref die = 0;
/* Add the name for the main input file now. We delayed this from
dwarf2out_init to avoid complications with PCH. */
! add_name_attribute (comp_unit_die, filename);
! if (filename[0] != DIR_SEPARATOR)
add_comp_dir_attribute (comp_unit_die);
else if (get_AT (comp_unit_die, DW_AT_comp_dir) == NULL)
{
Index: f/ste.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/f/ste.c,v
retrieving revision 1.33
diff -c -3 -p -r1.33 ste.c
*** f/ste.c 13 Apr 2003 01:45:33 -0000 1.33
--- f/ste.c 30 Apr 2003 16:27:39 -0000
*************** typedef struct gbe_block
*** 388,394 ****
struct gbe_block *outer;
ffestw block;
int lineno;
! const char *input_filename;
bool is_stmt;
} *gbe_block;
--- 388,394 ----
struct gbe_block *outer;
ffestw block;
int lineno;
! const char *filename;
bool is_stmt;
} *gbe_block;
*************** ffeste_start_block_ (ffestw block)
*** 401,408 ****
b->outer = ffeste_top_block_;
b->block = block;
! b->lineno = lineno;
! b->input_filename = input_filename;
b->is_stmt = FALSE;
ffeste_top_block_ = b;
--- 401,408 ----
b->outer = ffeste_top_block_;
b->block = block;
! b->lineno = lineno;
! b->filename = input_filename;
b->is_stmt = FALSE;
ffeste_top_block_ = b;
*************** ffeste_start_stmt_(void)
*** 443,450 ****
b->outer = ffeste_top_block_;
b->block = NULL;
! b->lineno = lineno;
! b->input_filename = input_filename;
b->is_stmt = TRUE;
ffeste_top_block_ = b;
--- 443,451 ----
b->outer = ffeste_top_block_;
b->block = NULL;
! b->lineno = lineno;
! b->filename = input_filename;
b->is_stmt = TRUE;
ffeste_top_block_ = b;