diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-14 21:18:15 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-14 21:18:15 +0000 |
commit | c6a8cd53cf488e97ecd3744cfc8a69e7c7a4b994 (patch) | |
tree | b05a5187c5f66174f8834e8f396ca621a418a89d | |
parent | bfbc45f594c078a1a959d3e2f0033c927efdc414 (diff) | |
download | linaro-gcc-c6a8cd53cf488e97ecd3744cfc8a69e7c7a4b994.tar.gz linaro-gcc-c6a8cd53cf488e97ecd3744cfc8a69e7c7a4b994.tar.bz2 linaro-gcc-c6a8cd53cf488e97ecd3744cfc8a69e7c7a4b994.zip |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69359 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/cfglayout.c | 24 | ||||
-rw-r--r-- | gcc/final.c | 5 | ||||
-rw-r--r-- | gcc/rtl.h | 2 |
4 files changed, 32 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ecd072f9288..7d63ed9efe7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +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 diff --git a/gcc/cfglayout.c b/gcc/cfglayout.c index 7172eaa7c3d..38390894ac8 100644 --- a/gcc/cfglayout.c +++ b/gcc/cfglayout.c @@ -435,13 +435,12 @@ insn_scope (rtx insn) 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; @@ -463,13 +462,19 @@ insn_line (rtx insn) 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; @@ -491,6 +496,13 @@ insn_file (rtx insn) 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. */ diff --git a/gcc/final.c b/gcc/final.c index e3ded5db34a..cfc730cf1f7 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -1349,8 +1349,9 @@ final_start_function (rtx first ATTRIBUTE_UNUSED, FILE *file, } #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); diff --git a/gcc/rtl.h b/gcc/rtl.h index bc9d5ee2691..9d3b0dc1b9b 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -1544,6 +1544,8 @@ extern rtx prev_cc0_setter (rtx); 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 */ |