summaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.c
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-07 17:57:30 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-07 17:57:30 +0000
commitbccd9980ca2e3edf28fee1c190f36a2119cf03e4 (patch)
tree193bbe1a5e7e548cfde12119b9718bb33a509382 /gcc/emit-rtl.c
parentacbfaf552b8cf18258950a2a699c1e89f25ba19f (diff)
downloadgcc-bccd9980ca2e3edf28fee1c190f36a2119cf03e4.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69047 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r--gcc/emit-rtl.c43
1 files changed, 15 insertions, 28 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index d191b286bb3..3b926dfb305 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -4665,35 +4665,31 @@ emit_barrier (void)
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;
}
@@ -4739,17 +4735,8 @@ emit_note (int note_no)
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)