cp-tree.h (struct tree_srcloc): Use location_t.
authorGabriel Dos Reis <gdr@integrable-solutions.net>
Wed, 18 Dec 2002 13:07:42 +0000 (13:07 +0000)
committerGabriel Dos Reis <gdr@gcc.gnu.org>
Wed, 18 Dec 2002 13:07:42 +0000 (13:07 +0000)
        * cp-tree.h (struct tree_srcloc): Use location_t.
        (SOURCE_LOCUS): New.
        (SRCLOC_FILE, SRCLOC_LINE): Adjust.

From-SVN: r60247

gcc/cp/ChangeLog
gcc/cp/cp-tree.h

index 67b90addcaa6b42ff1a3ea1273015239bf9808aa..342f2ecffd84aa2aa41827e5316d0830f4089b75 100644 (file)
@@ -1,3 +1,9 @@
+2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
+
+       * cp-tree.h (struct tree_srcloc): Use location_t.
+       (SOURCE_LOCUS): New.
+       (SRCLOC_FILE, SRCLOC_LINE): Adjust.
+
 2002-12-17  Jason Merrill  <jason@redhat.com>
 
        * decl.c (finish_function): Also complain about no return in
index 9176eba7d49cb0eda64734719a5fe81dbb10d9f7..7022e7322f852ffc25c723de56a26cc2d280c8f3 100644 (file)
@@ -399,13 +399,15 @@ struct tree_wrapper GTY(())
   struct z_candidate *z_c;
 };
 
-#define SRCLOC_FILE(NODE) (((struct tree_srcloc*)SRCLOC_CHECK (NODE))->filename)
-#define SRCLOC_LINE(NODE) (((struct tree_srcloc*)SRCLOC_CHECK (NODE))->linenum)
+#define SOURCE_LOCUS(NODE) \
+   (((struct tree_srcloc*)SRCLOC_CHECK (NODE))->locus)
+#define SRCLOC_FILE(NODE) SOURCE_LOCUS (NODE).file
+#define SRCLOC_LINE(NODE) SOURCE_LOCUS (NODE).line
+
 struct tree_srcloc GTY(())
 {
   struct tree_common common;
-  const char *filename;
-  int linenum;
+  location_t locus;
 };
 
 /* Macros for access to language-specific slots in an identifier.  */