* rtl.h (emit_line_note): Take a location_t.
(emit_line_note_force): Remove.
(set_file_and_line_for_statement): Take a location_t.
* tree.g (emit_line_note): Take a location_t.
* emit-rtl.c (emit_line_note): Take a location_t.
(emit_line_note_force): Remove.
* function.c (init_function_start): Adjust emit_line_note call.
(expand_function_end): Use force_next_line_note, not
emit_line_note_force.
* c-parse.in (maybe_type_qual): Adjust emit_line_note calls.
* c-semantics.c (genrtl_do_pushlevel, genrtl_goto_stmt,
genrtl_expr_stmt_value, genrtl_decl_stmt, genrtl_if_stmt,
genrtl_while_stmt, genrtl_do_stmt_1, genrtl_return_stmt,
genrtl_for_stmt, genrtl_break_stmt, genrtl_continue_stmt,
genrtl_continue_stmt, genrtl_switch_stmt,
genrtl_asm_stmt): Likewise.
* expr.c (expand_expr): Likewise.
* integrate.c (expand_inline_function): Likewise.
* stmt.c (set_file_and_line_for_stmt): Take a location_t.
(expand_decl_init): Adjust emit_line_note call.
* ada/trans.c (build_unit_elab, set_lineno): Adjust emit_line_note
calls.
* cp/semantics.c: (genrtl_try_block) Adjust emit_line_note
calls.
* f/com.c (bison_rule_pushlevel_, bison_rule_compstmt_): Adjust
emit_line_note calls.
* f/ste.c (ffeste_emit_line_note_): Likewise.
* java/expr.c (expand_byte_code):
* treelang/treetree.c (tree_code_if_start, tree_code_if_else,
tree_code_if_end, tree_code_create_function_initial,
tree_code_create_function_wrapup, tree_code_generate_return,
tree_code_output_expression_statement): Adjust emit_line_note
calls.
From-SVN: r69047
+2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
+
+ * rtl.h (emit_line_note): Take a location_t.
+ (emit_line_note_force): Remove.
+ (set_file_and_line_for_statement): Take a location_t.
+ * tree.g (emit_line_note): Take a location_t.
+ * emit-rtl.c (emit_line_note): Take a location_t.
+ (emit_line_note_force): Remove.
+ * function.c (init_function_start): Adjust emit_line_note call.
+ (expand_function_end): Use force_next_line_note, not
+ emit_line_note_force.
+ * c-parse.in (maybe_type_qual): Adjust emit_line_note calls.
+ * c-semantics.c (genrtl_do_pushlevel, genrtl_goto_stmt,
+ genrtl_expr_stmt_value, genrtl_decl_stmt, genrtl_if_stmt,
+ genrtl_while_stmt, genrtl_do_stmt_1, genrtl_return_stmt,
+ genrtl_for_stmt, genrtl_break_stmt, genrtl_continue_stmt,
+ genrtl_continue_stmt, genrtl_switch_stmt,
+ genrtl_asm_stmt): Likewise.
+ * expr.c (expand_expr): Likewise.
+ * integrate.c (expand_inline_function): Likewise.
+ * stmt.c (set_file_and_line_for_stmt): Take a location_t.
+ (expand_decl_init): Adjust emit_line_note call.
+
2003-07-07 Dale Johannesen <dalej@apple.com>
* config/rs6000/darwin-tramp.asm: Fix trampolines. PR 10900.
+2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
+
+ * trans.c (build_unit_elab, set_lineno): Adjust emit_line_note
+ calls.
+
2003-07-06 Neil Booth <neil@daikokuya.co.uk>
* misc.c (gnat_handle_option): Don't handle filenames.
&& TYPE_IS_PADDING_P (TREE_TYPE (lhs)))
lhs = convert (TREE_TYPE (TYPE_FIELDS (TREE_TYPE (lhs))), lhs);
- emit_line_note (input_filename, input_line);
+ emit_line_note (input_location);
expand_expr_stmt (build_binary_op (MODIFY_EXPR, NULL_TREE,
TREE_PURPOSE (gnu_elab_list),
TREE_VALUE (gnu_elab_list)));
input_line = Get_Logical_Line_Number (source_location);
if (write_note_p)
- emit_line_note (input_filename, input_line);
+ emit_line_note (input_location);
}
\f
/* Post an error message. MSG is the error message, properly annotated.
maybe_type_qual:
/* empty */
- { emit_line_note (input_filename, input_line);
+ { emit_line_note (input_location);
$$ = NULL_TREE; }
| TYPE_QUAL
- { emit_line_note (input_filename, input_line); }
+ { emit_line_note (input_location); }
;
xexpr:
void
genrtl_do_pushlevel (void)
{
- emit_line_note (input_filename, input_line);
+ emit_line_note (input_location);
clear_last_expr ();
}
if (TREE_CODE (destination) == LABEL_DECL)
TREE_USED (destination) = 1;
- emit_line_note (input_filename, input_line);
+ emit_line_note (input_location);
if (TREE_CODE (destination) == LABEL_DECL)
{
{
if (expr != NULL_TREE)
{
- emit_line_note (input_filename, input_line);
+ emit_line_note (input_location);
if (stmts_are_full_exprs_p ())
expand_start_target_temps ();
genrtl_decl_stmt (tree t)
{
tree decl;
- emit_line_note (input_filename, input_line);
+ emit_line_note (input_location);
decl = DECL_STMT_DECL (t);
/* If this is a declaration for an automatic local
variable, initialize it. Note that we might also see a
tree cond;
genrtl_do_pushlevel ();
cond = expand_cond (IF_COND (t));
- emit_line_note (input_filename, input_line);
+ emit_line_note (input_location);
expand_start_cond (cond, 0);
if (THEN_CLAUSE (t))
{
tree cond = WHILE_COND (t);
emit_nop ();
- emit_line_note (input_filename, input_line);
+ emit_line_note (input_location);
expand_start_loop (1);
genrtl_do_pushlevel ();
if (cond && !integer_nonzerop (cond))
{
cond = expand_cond (cond);
- emit_line_note (input_filename, input_line);
+ emit_line_note (input_location);
expand_exit_loop_top_cond (0, cond);
genrtl_do_pushlevel ();
}
else if (integer_nonzerop (cond))
{
emit_nop ();
- emit_line_note (input_filename, input_line);
+ emit_line_note (input_location);
expand_start_loop (1);
expand_stmt (body);
- emit_line_note (input_filename, input_line);
+ emit_line_note (input_location);
expand_end_loop ();
}
else
{
emit_nop ();
- emit_line_note (input_filename, input_line);
+ emit_line_note (input_location);
expand_start_loop_continue_elsewhere (1);
expand_stmt (body);
expand_loop_continue_here ();
cond = expand_cond (cond);
- emit_line_note (input_filename, input_line);
+ emit_line_note (input_location);
expand_exit_loop_if_false (0, cond);
expand_end_loop ();
}
expr = RETURN_STMT_EXPR (stmt);
- emit_line_note (input_filename, input_line);
+ emit_line_note (input_location);
if (!expr)
expand_null_return ();
else
/* Expand the initialization. */
emit_nop ();
- emit_line_note (input_filename, input_line);
+ emit_line_note (input_location);
if (FOR_EXPR (t))
expand_start_loop_continue_elsewhere (1);
else
if (cond && !integer_nonzerop (cond))
{
cond = expand_cond (cond);
- emit_line_note (input_filename, input_line);
+ emit_line_note (input_location);
expand_exit_loop_top_cond (0, cond);
genrtl_do_pushlevel ();
}
/* Expand the increment expression. */
input_location = saved_loc;
- emit_line_note (input_filename, input_line);
+ emit_line_note (input_location);
if (FOR_EXPR (t))
{
expand_loop_continue_here ();
void
genrtl_break_stmt (void)
{
- emit_line_note (input_filename, input_line);
+ emit_line_note (input_location);
if ( ! expand_exit_something ())
error ("break statement not within loop or switch");
}
void
genrtl_continue_stmt (void)
{
- emit_line_note (input_filename, input_line);
+ emit_line_note (input_location);
if (! expand_continue_loop (0))
error ("continue statement not within a loop");
}
crash. */
cond = boolean_false_node;
- emit_line_note (input_filename, input_line);
+ emit_line_note (input_location);
expand_start_case (1, cond, TREE_TYPE (cond), "switch statement");
expand_stmt (expand_unreachable_stmt (SWITCH_BODY (t), warn_notreached));
expand_end_case_type (cond, SWITCH_TYPE (t));
cv_qualifier = NULL_TREE;
}
- emit_line_note (input_filename, input_line);
+ emit_line_note (input_location);
if (asm_input_p)
expand_asm (string, cv_qualifier != NULL_TREE);
else
+2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
+
+ * semantics.c: (genrtl_try_block) Adjust emit_line_note
+ calls.
+
2003-07-07 Andreas Jaeger <aj@suse.de>
* search.c (lookup_base_r): Remove unused variable.
else
{
if (!FN_TRY_BLOCK_P (t))
- emit_line_note (input_filename, input_line);
+ emit_line_note (input_location);
expand_eh_region_start ();
expand_stmt (TRY_STMTS (t));
return barrier;
}
-/* Make an insn of code NOTE
- with data-fields specified by FILE and LINE
- and add it to the end of the doubly-linked list,
- but only if line-numbers are desired for debugging info. */
+/* Make line numbering NOTE insn for LOCATION add it to the end
+ of the doubly-linked list, but only if line-numbers are desired for
+ debugging info and it doesn't match the previous one. */
rtx
-emit_line_note (const char *file, int line)
+emit_line_note (location_t location)
{
rtx note;
-
- if (line < 0)
- abort ();
-
- set_file_and_line_for_stmt (file, line);
-
- if (file && last_location.file && !strcmp (file, last_location.file)
- && line == last_location.line)
+
+ set_file_and_line_for_stmt (location);
+
+ if (location.file && last_location.file
+ && !strcmp (location.file, last_location.file)
+ && location.line == last_location.line)
return NULL_RTX;
- last_location.file = file;
- last_location.line = line;
-
+ last_location = location;
+
if (no_line_numbers)
{
cur_insn_uid++;
return NULL_RTX;
}
- note = emit_note (line);
- NOTE_SOURCE_FILE (note) = file;
+ note = emit_note (location.line);
+ NOTE_SOURCE_FILE (note) = location.file;
return note;
}
return note;
}
-/* Emit a NOTE, and don't omit it even if LINE is the previous note. */
-
-rtx
-emit_line_note_force (const char *file, int line)
-{
- last_location.line = -1;
- return emit_line_note (file, line);
-}
-
/* Cause next statement to emit a line note even if the line number
- has not changed. This is used at the beginning of a function. */
+ has not changed. */
void
force_next_line_note (void)
input_filename = EXPR_WFL_FILENAME (exp);
input_line = EXPR_WFL_LINENO (exp);
if (EXPR_WFL_EMIT_LINE_NOTE (exp))
- emit_line_note (input_filename, input_line);
+ emit_line_note (input_location);
/* Possibly avoid switching back and forth here. */
to_return = expand_expr (EXPR_WFL_NODE (exp), target, tmode, modifier);
input_location = saved_loc;
+Mon Jul 7 18:13:22 2003 Nathan Sidwell <nathan@codesourcery.com>
+
+ * com.c (bison_rule_pushlevel_, bison_rule_compstmt_): Adjust
+ emit_line_note calls.
+ * ste.c (ffeste_emit_line_note_): Likewise.
+
2003-07-06 Andreas Jaeger <aj@suse.de>
* bad.c: Convert () to (void) in function definitions.
static void
bison_rule_pushlevel_ (void)
{
- emit_line_note (input_filename, input_line);
+ emit_line_note (input_location);
pushlevel (0);
clear_last_expr ();
expand_start_bindings (0);
if (! keep)
current_binding_level->names = NULL_TREE;
- emit_line_note (input_filename, input_line);
+ emit_line_note (input_location);
expand_end_bindings (getdecls (), keep, 0);
t = poplevel (keep, 1, 0);
/* Internal macros. */
#define ffeste_emit_line_note_() \
- emit_line_note (input_filename, input_line)
+ emit_line_note (input_location)
#define ffeste_check_simple_() \
assert(ffeste_statelet_ == FFESTE_stateletSIMPLE_)
#define ffeste_check_start_() \
function prologue. Note linenums could be missing, e.g. when
compiling a Java .class file. */
if (DECL_SOURCE_LINE (subr))
- emit_line_note (DECL_SOURCE_FILE (subr), DECL_SOURCE_LINE (subr));
+ emit_line_note (DECL_SOURCE_LOCATION (subr));
/* Make sure first insn is a note even if we don't want linenums.
This makes sure the first insn will never be deleted.
/* Output a linenumber for the end of the function.
SDB depends on this. */
-
- emit_line_note_force (input_filename, input_line);
+ force_next_line_note ();
+ emit_line_note (input_location);
/* Before the return label (if any), clobber the return
registers so that they are not propagated live to the rest of
&& ! (GET_CODE (XEXP (loc, 0)) == REG
&& REGNO (XEXP (loc, 0)) > LAST_VIRTUAL_REGISTER))
{
- rtx note = emit_line_note (DECL_SOURCE_FILE (formal),
- DECL_SOURCE_LINE (formal));
+ rtx note = emit_line_note (DECL_SOURCE_LOCATION (formal));
+
if (note)
RTX_INTEGRATED_P (note) = 1;
if (flag_test_coverage)
emit_note (NOTE_INSN_REPEATED_LINE_NUMBER);
- emit_line_note (input_filename, input_line);
+ emit_line_note (input_location);
/* If the function returns a BLKmode object in a register, copy it
out of the temp register into a BLKmode memory object. */
+2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
+
+ * expr.c (expand_byte_code): Adjist emit_line_note call.
+
2003-07-06 Neil Booth <neil@daikokuya.co.uk>
* lang.c (java_handle_option): Don't handle filenames.
if (pc == PC)
{
input_line = GET_u2 (linenumber_pointer - 2);
- emit_line_note (input_filename, input_line);
+ emit_line_note (input_location);
if (!(instruction_bits[PC] & BCODE_HAS_MULTI_LINENUMBERS))
break;
}
extern rtx emit_barrier (void);
extern rtx emit_note (int);
extern rtx emit_note_copy (rtx);
-extern rtx emit_line_note (const char *, int);
-extern rtx emit_line_note_force (const char *, int);
+extern rtx emit_line_note (location_t);
extern rtx make_insn_raw (rtx);
extern void add_function_usage_to (rtx, rtx);
extern rtx last_call_insn (void);
extern void purge_hard_subreg_sets (rtx);
/* In stmt.c */
-extern void set_file_and_line_for_stmt (const char *, int);
+extern void set_file_and_line_for_stmt (location_t);
extern void expand_null_return (void);
extern void emit_jump (rtx);
extern int preserve_subexpressions_p (void);
}
\f
/* Record the current file and line. Called from emit_line_note. */
+
void
-set_file_and_line_for_stmt (const char *file, int line)
+set_file_and_line_for_stmt (location_t location)
{
/* If we're outputting an inline function, and we add a line note,
there may be no CFUN->STMT information. So, there's no need to
update it. */
if (cfun->stmt)
- {
- emit_locus.file = file;
- emit_locus.line = line;
- }
+ emit_locus = location;
}
/* Emit a no-op instruction. */
}
else if (DECL_INITIAL (decl) && TREE_CODE (DECL_INITIAL (decl)) != TREE_LIST)
{
- emit_line_note (DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl));
+ emit_line_note (DECL_SOURCE_LOCATION (decl));
expand_assignment (decl, DECL_INITIAL (decl), 0, 0);
emit_queue ();
}
/* In emit-rtl.c */
extern void start_sequence_for_rtl_expr (tree);
-extern rtx emit_line_note (const char *, int);
+extern rtx emit_line_note (location_t);
/* In calls.c */
+2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
+
+ * treelang/treetree.c (tree_code_if_start, tree_code_if_else,
+ tree_code_if_end, tree_code_create_function_initial,
+ tree_code_create_function_wrapup, tree_code_generate_return,
+ tree_code_output_expression_statement): Adjust emit_line_note
+ calls.
+
2003-07-04 H.J. Lu <hongjiu.lu@intel.com>
* Make-lang.in: Replace PWD with PWD_COMMAND.
TREE_TYPE (exp),
exp,
build1 (CONVERT_EXPR, TREE_TYPE (exp), integer_zero_node));
- emit_line_note (loc.file, loc.line); /* Output the line number information. */
+ emit_line_note (loc); /* Output the line number information. */
expand_start_cond (cond_exp, /* Exit-able if nonzero. */ 0);
}
void
tree_code_if_else (location_t loc)
{
- emit_line_note (loc.file, loc.line); /* Output the line number information. */
+ emit_line_note (loc); /* Output the line number information. */
expand_start_else ();
}
void
tree_code_if_end (location_t loc)
{
- emit_line_note (loc.file, loc.line); /* Output the line number information. */
+ emit_line_note (loc); /* Output the line number information. */
expand_end_cond ();
}
expand_start_bindings (0);
- emit_line_note (loc.file, loc.line); /* Output the line number information. */
+ emit_line_note (loc); /* Output the line number information. */
}
/* Wrapup a function contained in file FILENAME, ending at line LINENO. */
fn_decl = current_function_decl;
- emit_line_note (loc.file, loc.line); /* Output the line number information. */
+ emit_line_note (loc); /* Output the line number information. */
/* Get completely built level from debugger symbol table. */
void
-tree_code_output_expression_statement (tree code,
- location_t loc)
+tree_code_output_expression_statement (tree code, location_t loc)
{
/* Output the line number information. */
- emit_line_note (loc.file, loc.line);
+ emit_line_note (loc);
TREE_USED (code) = 1;
TREE_SIDE_EFFECTS (code) = 1;
expand_expr_stmt (code);