This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[ada PATCH]: Use location_t
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 03 May 2003 17:44:16 +0100
- Subject: [ada PATCH]: Use location_t
- Organization: Codesourcery LLC
And this is the ada part of the update.
installed after testing on i686-pc-linux-gnu.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
The voices in my head said this was stupid too
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
2003-05-03 Nathan Sidwell <nathan@codesourcery.com>
* trans.c (tree_transform): Use location_t and input_location
directly.
(build_unit_elab): Likewise.
* utils.c (create_label_decl): Likewise.
Index: ada/trans.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/trans.c,v
retrieving revision 1.27
diff -c -3 -p -r1.27 trans.c
*** ada/trans.c 1 May 2003 18:44:48 -0000 1.27
--- ada/trans.c 3 May 2003 14:10:41 -0000
*************** tree_transform (gnat_node)
*** 2619,2626 ****
the body so that the line number notes are written
correctly. */
set_lineno (gnat_node, 0);
! DECL_SOURCE_FILE (gnu_subprog_decl) = input_filename;
! DECL_SOURCE_LINE (gnu_subprog_decl) = input_line;
begin_subprog_body (gnu_subprog_decl);
set_lineno (gnat_node, 1);
--- 2619,2625 ----
the body so that the line number notes are written
correctly. */
set_lineno (gnat_node, 0);
! DECL_SOURCE_LOCATION (gnu_subprog_decl) = input_location;
begin_subprog_body (gnu_subprog_decl);
set_lineno (gnat_node, 1);
*************** build_unit_elab (gnat_unit, body_p, gnu_
*** 5342,5349 ****
{
tree lhs = TREE_PURPOSE (gnu_elab_list);
! input_filename = DECL_SOURCE_FILE (lhs);
! input_line = DECL_SOURCE_LINE (lhs);
/* If LHS has a padded type, convert it to the unpadded type
so the assignment is done properly. */
--- 5341,5347 ----
{
tree lhs = TREE_PURPOSE (gnu_elab_list);
! input_location = DECL_SOURCE_LOCATION (lhs);
/* If LHS has a padded type, convert it to the unpadded type
so the assignment is done properly. */
Index: ada/utils.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/utils.c,v
retrieving revision 1.26
diff -c -3 -p -r1.26 utils.c
*** ada/utils.c 1 May 2003 16:13:31 -0000 1.26
--- ada/utils.c 3 May 2003 14:10:48 -0000
*************** create_label_decl (label_name)
*** 1663,1670 ****
DECL_CONTEXT (label_decl) = current_function_decl;
DECL_MODE (label_decl) = VOIDmode;
! DECL_SOURCE_LINE (label_decl) = input_line;
! DECL_SOURCE_FILE (label_decl) = input_filename;
return label_decl;
}
--- 1663,1669 ----
DECL_CONTEXT (label_decl) = current_function_decl;
DECL_MODE (label_decl) = VOIDmode;
! DECL_SOURCE_LOCATION (label_decl) = input_location;
return label_decl;
}