tree.c (last_annotated_node): Change type to location_t*.
authorAndrew Pinski <pinskia@physics.uc.edu>
Tue, 4 Oct 2005 14:00:20 +0000 (14:00 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Tue, 4 Oct 2005 14:00:20 +0000 (07:00 -0700)
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

gcc/ChangeLog
gcc/tree.c

index 9c0067484fa3255c97b50a7dacdc4be646b51b2a..c8025e5fdd3f10fe8877432601ef2a84f76780f6 100644 (file)
@@ -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>
 
        PR c/23576
index f7f65030ddd707d0319c4651ceee2b1e5f57c86a..4140791e078830bda5bcd5d241a679fc8e445cf8 100644 (file)
@@ -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