From c6a8cd53cf488e97ecd3744cfc8a69e7c7a4b994 Mon Sep 17 00:00:00 2001 From: hubicka Date: Mon, 14 Jul 2003 21:18:15 +0000 Subject: * 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 --- gcc/cfglayout.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'gcc/cfglayout.c') 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. */ -- cgit v1.2.1