aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@physics.uc.edu>2005-10-04 14:00:20 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2005-10-04 07:00:20 -0700
commitb4ceda1341afdca17c0892efe8a53da84ac792a8 (patch)
treece2be1c6bea782f75d4e51b5ae17a83de7ab15ed /gcc/tree.c
parent9df594d7e7119cbbb3618298054ab15d4d3db258 (diff)
downloadgcc-b4ceda1341afdca17c0892efe8a53da84ac792a8.zip
gcc-b4ceda1341afdca17c0892efe8a53da84ac792a8.tar.gz
gcc-b4ceda1341afdca17c0892efe8a53da84ac792a8.tar.bz2
tree.c (last_annotated_node): Change type to location_t*.
2005-10-04 Andrew Pinski <pinskia@physics.uc.edu> * tree.c (last_annotated_node): Change type to location_t*. (annotate_with_file_line): Reflect the change of last_annotated_node type. From-SVN: r104944
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index f7f6503..4140791 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -3107,7 +3107,7 @@ build_block (tree vars, tree subblocks, tree supercontext, tree chain)
#if 1 /* ! defined(USE_MAPPED_LOCATION) */
/* ??? gengtype doesn't handle conditionals */
-static GTY(()) tree last_annotated_node;
+static GTY(()) location_t *last_annotated_node;
#endif
#ifdef USE_MAPPED_LOCATION
@@ -3143,7 +3143,7 @@ annotate_with_file_line (tree node, const char *file, int line)
&& (EXPR_FILENAME (node) == file
|| !strcmp (EXPR_FILENAME (node), file)))
{
- last_annotated_node = node;
+ last_annotated_node = EXPR_LOCUS (node);
return;
}
@@ -3151,19 +3151,18 @@ annotate_with_file_line (tree node, const char *file, int line)
entry cache can reduce the number of allocations by more
than half. */
if (last_annotated_node
- && EXPR_LOCUS (last_annotated_node)
- && EXPR_LINENO (last_annotated_node) == line
- && (EXPR_FILENAME (last_annotated_node) == file
- || !strcmp (EXPR_FILENAME (last_annotated_node), file)))
+ && last_annotated_node->line == line == line
+ && (last_annotated_node->file == file
+ || !strcmp (last_annotated_node->file, file)))
{
- SET_EXPR_LOCUS (node, EXPR_LOCUS (last_annotated_node));
+ SET_EXPR_LOCUS (node, last_annotated_node);
return;
}
SET_EXPR_LOCUS (node, ggc_alloc (sizeof (location_t)));
EXPR_LINENO (node) = line;
EXPR_FILENAME (node) = file;
- last_annotated_node = node;
+ last_annotated_node = EXPR_LOCUS (node);
}
void