aboutsummaryrefslogtreecommitdiff
path: root/gcc/treelang
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2003-09-21 16:39:40 -0700
committerRichard Henderson <rth@gcc.gnu.org>2003-09-21 16:39:40 -0700
commit7e2af53a14ce4710e1dca754acf603db0f9d8802 (patch)
treed04ef32430711aab636f45451f9e7a3ad34ab36f /gcc/treelang
parentd6a1d39a7dbf00f373ace14470d5edb5cc4337be (diff)
downloadgcc-7e2af53a14ce4710e1dca754acf603db0f9d8802.zip
gcc-7e2af53a14ce4710e1dca754acf603db0f9d8802.tar.gz
gcc-7e2af53a14ce4710e1dca754acf603db0f9d8802.tar.bz2
tree.h (TREE_LOCUS): Rename from DECL_SOURCE_LOCATION; make const.
* tree.h (TREE_LOCUS): Rename from DECL_SOURCE_LOCATION; make const. (TREE_FILENAME, TREE_LINENO): Likewise. (set_tree_locus, copy_tree_locus, set_tree_file_line): New. (TREE_LOCUS_SET_P): New. * c-aux-info.c, c-decl.c, c-parse.in, coverage.c, dbxout.c, diagnostic.c, dwarf2out.c, dwarfout.c, function.c, integrate.c, print-tree.c, stmt.c, toplev.c, tree-dump.c, tree-inline.c, tree-optimize.c, tree.c, tree.def, xcoffout.c, config/alpha/alpha.c, config/mips/mips.c, doc/c-tree.texi, objc/objc-act.c: Update to match. ada/ * trans.c, utils.c: Update for DECL_SOURCE_LOCATION rename and change to const. cp/ * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c, method.c, optimize.c, pt.c, semantics.c, tree.c: Update for DECL_SOURCE_LOCATION rename and change to const. f/ * com.c, ste.c: Update for DECL_SOURCE_LOCATION rename and change to const. java/ * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y, resource.c: Update for DECL_SOURCE_LOCATION rename and change to const. treelang/ * treetree.c: Update for DECL_SOURCE_LOCATION rename and change to const. From-SVN: r71636
Diffstat (limited to 'gcc/treelang')
-rw-r--r--gcc/treelang/ChangeLog5
-rw-r--r--gcc/treelang/treetree.c13
2 files changed, 12 insertions, 6 deletions
diff --git a/gcc/treelang/ChangeLog b/gcc/treelang/ChangeLog
index 7b8a5a5..75b9b2f 100644
--- a/gcc/treelang/ChangeLog
+++ b/gcc/treelang/ChangeLog
@@ -1,3 +1,8 @@
+2003-09-21 Richard Henderson <rth@redhat.com>
+
+ * treetree.c: Update for DECL_SOURCE_LOCATION rename and
+ change to const.
+
2003-07-28 Andreas Jaeger <aj@suse.de>
* treetree.c: Convert remaining K&R prototypes to ISO C90.
diff --git a/gcc/treelang/treetree.c b/gcc/treelang/treetree.c
index 7697e3c..da92110 100644
--- a/gcc/treelang/treetree.c
+++ b/gcc/treelang/treetree.c
@@ -313,8 +313,9 @@ tree_code_create_function_prototype (unsigned char* chars,
id = get_identifier ((const char*)chars);
fn_decl = build_decl (FUNCTION_DECL, id, fn_type);
- DECL_CONTEXT (fn_decl) = NULL_TREE; /* Nested functions not supported here. */
- DECL_SOURCE_LOCATION (fn_decl) = loc;
+ /* Nested functions not supported here. */
+ DECL_CONTEXT (fn_decl) = NULL_TREE;
+ set_tree_locus (fn_decl, loc);
TREE_USED (fn_decl) = 1;
@@ -387,14 +388,14 @@ tree_code_create_function_initial (tree prev_saved,
current_function_decl = fn_decl;
DECL_INITIAL (fn_decl) = error_mark_node;
- DECL_SOURCE_LOCATION (fn_decl) = loc;
+ set_tree_locus (fn_decl, loc);
/* Prepare creation of rtl for a new function. */
resultdecl = DECL_RESULT (fn_decl)
= build_decl (RESULT_DECL, NULL_TREE, TREE_TYPE (TREE_TYPE (fn_decl)));
DECL_CONTEXT (DECL_RESULT (fn_decl)) = fn_decl;
- DECL_SOURCE_LOCATION (resultdecl) = loc;
+ set_tree_locus (resultdecl, loc);
/* Work out the size. ??? is this needed. */
layout_decl (DECL_RESULT (fn_decl), 0);
@@ -414,7 +415,7 @@ tree_code_create_function_initial (tree prev_saved,
if (!fn_decl)
abort ();
DECL_CONTEXT (parm_decl) = fn_decl;
- DECL_SOURCE_LOCATION (parm_decl) = loc;
+ set_tree_locus (parm_decl, loc);
parm_list = chainon (parm_decl, parm_list);
}
@@ -582,7 +583,7 @@ tree_code_create_variable (unsigned int storage_class,
DECL_CONTEXT (var_decl) = current_function_decl;
- DECL_SOURCE_LOCATION (var_decl) = loc;
+ set_tree_locus (var_decl, loc);
/* Set the storage mode and whether only visible in the same file. */
switch (storage_class)