+Mon Jul 14 23:14:28 CEST 2003 Jan Hubicka <jh@suse.cz>
+
+ * cfglayout.c (locator_file): Break out from ....
+ (insn_file): ... here.
+ (locator_line): Break out from ....
+ (insn_line): ... here.
+ * rtl.h (locator_file, locator_line): Declare.
+ (final_start_function): Set proper line/file info.
+
2003-07-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
* c-pretty-print.c (pp_c_unary_expression): A CONVERT_EXPR is
return VARRAY_TREE (block_locators_blocks, min);
}
-/* Return line number of the statement that produced this insn. */
+/* Return line number of the statement specified by the locator. */
int
-insn_line (rtx insn)
+locator_line (int loc)
{
int max = VARRAY_ACTIVE_SIZE (line_locators_locs);
int min = 0;
- int loc = INSN_LOCATOR (insn);
if (!max || !loc)
return 0;
return VARRAY_INT (line_locators_lines, min);
}
-/* Return source file of the statement that produced this insn. */
+/* Return line number of the statement that produced this insn. */
+int
+insn_line (rtx insn)
+{
+ return locator_line (INSN_LOCATOR (insn));
+}
+
+/* Return source file of the statement specified by LOC. */
const char *
-insn_file (rtx insn)
+locator_file (int loc)
{
int max = VARRAY_ACTIVE_SIZE (file_locators_locs);
int min = 0;
- int loc = INSN_LOCATOR (insn);
if (!max || !loc)
return NULL;
return VARRAY_CHAR_PTR (file_locators_files, min);
}
+/* Return source file of the statement that produced this insn. */
+const char *
+insn_file (rtx insn)
+{
+ return locator_file (INSN_LOCATOR (insn));
+}
+
/* Rebuild all the NOTE_INSN_BLOCK_BEG and NOTE_INSN_BLOCK_END notes based
on the scope tree and the newly reordered instructions. */
}
#endif
- last_linenum = 0;
- last_filename = 0;
+ last_filename = locator_file (prologue_locator);
+ last_linenum = locator_line (prologue_locator);
+
high_block_linenum = high_function_linenum = last_linenum;
(*debug_hooks->begin_prologue) (last_linenum, last_filename);
extern tree choose_inner_scope (tree, tree);
extern int insn_line (rtx);
extern const char * insn_file (rtx);
+extern int locator_line (int);
+extern const char * locator_file (int);
extern int prologue_locator, epilogue_locator;
/* In jump.c */