mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-29 23:56:14 +08:00
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
This commit is contained in:
parent
9df594d7e7
commit
b4ceda1341
@ -1,3 +1,9 @@
|
|||||||
|
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.
|
||||||
|
|
||||||
2005-10-04 Richard Guenther <rguenther@suse.de>
|
2005-10-04 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
PR c/23576
|
PR c/23576
|
||||||
|
15
gcc/tree.c
15
gcc/tree.c
@ -3107,7 +3107,7 @@ build_block (tree vars, tree subblocks, tree supercontext, tree chain)
|
|||||||
|
|
||||||
#if 1 /* ! defined(USE_MAPPED_LOCATION) */
|
#if 1 /* ! defined(USE_MAPPED_LOCATION) */
|
||||||
/* ??? gengtype doesn't handle conditionals */
|
/* ??? gengtype doesn't handle conditionals */
|
||||||
static GTY(()) tree last_annotated_node;
|
static GTY(()) location_t *last_annotated_node;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_MAPPED_LOCATION
|
#ifdef USE_MAPPED_LOCATION
|
||||||
@ -3143,7 +3143,7 @@ annotate_with_file_line (tree node, const char *file, int line)
|
|||||||
&& (EXPR_FILENAME (node) == file
|
&& (EXPR_FILENAME (node) == file
|
||||||
|| !strcmp (EXPR_FILENAME (node), file)))
|
|| !strcmp (EXPR_FILENAME (node), file)))
|
||||||
{
|
{
|
||||||
last_annotated_node = node;
|
last_annotated_node = EXPR_LOCUS (node);
|
||||||
return;
|
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
|
entry cache can reduce the number of allocations by more
|
||||||
than half. */
|
than half. */
|
||||||
if (last_annotated_node
|
if (last_annotated_node
|
||||||
&& EXPR_LOCUS (last_annotated_node)
|
&& last_annotated_node->line == line == line
|
||||||
&& EXPR_LINENO (last_annotated_node) == line
|
&& (last_annotated_node->file == file
|
||||||
&& (EXPR_FILENAME (last_annotated_node) == file
|
|| !strcmp (last_annotated_node->file, file)))
|
||||||
|| !strcmp (EXPR_FILENAME (last_annotated_node), file)))
|
|
||||||
{
|
{
|
||||||
SET_EXPR_LOCUS (node, EXPR_LOCUS (last_annotated_node));
|
SET_EXPR_LOCUS (node, last_annotated_node);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SET_EXPR_LOCUS (node, ggc_alloc (sizeof (location_t)));
|
SET_EXPR_LOCUS (node, ggc_alloc (sizeof (location_t)));
|
||||||
EXPR_LINENO (node) = line;
|
EXPR_LINENO (node) = line;
|
||||||
EXPR_FILENAME (node) = file;
|
EXPR_FILENAME (node) = file;
|
||||||
last_annotated_node = node;
|
last_annotated_node = EXPR_LOCUS (node);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user