Commit 640da953 by Per Bothner Committed by Per Bothner

toplev.c (push_srcloc): Simplify behavior to save current location and set…

toplev.c (push_srcloc): Simplify behavior to save current location and set current location to parameters.


	* toplev.c (push_srcloc):  Simplify behavior to save current location
	and set current location to parameters.
	(pop_srcloc):  Simplify semantics.
	(lang_dependent_init):  Remove now-useless initial push_srcloc.

From-SVN: r67512
parent 486f6e5f
2003-06-05 Per Bothner <pbothner@apple.com>
* toplev.c (push_srcloc): Simplify behavior to save current location
and set current location to parameters.
(pop_srcloc): Simplify semantics.
(lang_dependent_init): Remove now-useless initial push_srcloc.
2003-05-06 Richard Henderson <rth@redhat.com> 2003-05-06 Richard Henderson <rth@redhat.com>
* dwarf2out.c (loc_descriptor_from_tree): Return 0 for * dwarf2out.c (loc_descriptor_from_tree): Return 0 for
......
...@@ -2170,14 +2170,11 @@ push_srcloc (const char *file, int line) ...@@ -2170,14 +2170,11 @@ push_srcloc (const char *file, int line)
{ {
struct file_stack *fs; struct file_stack *fs;
if (input_file_stack)
input_file_stack->location = input_location;
fs = (struct file_stack *) xmalloc (sizeof (struct file_stack)); fs = (struct file_stack *) xmalloc (sizeof (struct file_stack));
input_filename = file;
input_line = line;
fs->location = input_location; fs->location = input_location;
fs->next = input_file_stack; fs->next = input_file_stack;
input_filename = file;
input_line = line;
input_file_stack = fs; input_file_stack = fs;
input_file_stack_tick++; input_file_stack_tick++;
} }
...@@ -2192,17 +2189,10 @@ pop_srcloc (void) ...@@ -2192,17 +2189,10 @@ pop_srcloc (void)
struct file_stack *fs; struct file_stack *fs;
fs = input_file_stack; fs = input_file_stack;
input_location = fs->location;
input_file_stack = fs->next; input_file_stack = fs->next;
free (fs); free (fs);
input_file_stack_tick++; input_file_stack_tick++;
if (input_file_stack)
input_location = input_file_stack->location;
else
{
input_filename = NULL;
input_line = 0;
}
} }
/* Compile an entire translation unit. Write a file of assembly /* Compile an entire translation unit. Write a file of assembly
...@@ -5651,9 +5641,6 @@ lang_dependent_init (const char *name) ...@@ -5651,9 +5641,6 @@ lang_dependent_init (const char *name)
init_expr_once (); init_expr_once ();
expand_dummy_function_end (); expand_dummy_function_end ();
/* Put an entry on the input file stack for the main input file. */
push_srcloc (input_filename, 0);
/* If dbx symbol table desired, initialize writing it and output the /* If dbx symbol table desired, initialize writing it and output the
predefined types. */ predefined types. */
timevar_push (TV_SYMOUT); timevar_push (TV_SYMOUT);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment