summaryrefslogtreecommitdiffstats
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>1998-04-08 14:03:48 +0000
committerbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>1998-04-08 14:03:48 +0000
commitdae7d8ad0370268c616e6d5a4bf8c2fd745735db (patch)
treeda1bfbbe113dd95c4e32fc4661d73298fc0876a6 /gcc/tree.h
parentb4e1922b7ff51a7d1a08a3c3c3644827bf23e52f (diff)
downloadppe42-gcc-dae7d8ad0370268c616e6d5a4bf8c2fd745735db.tar.gz
ppe42-gcc-dae7d8ad0370268c616e6d5a4bf8c2fd745735db.zip
d
Fri Apr 3 17:02:13 1998 Alexandre Petit-Bianco <apbianco@cygnus.com> * tree.def (EXPR_WITH_FILE_LOCATION): New tree node definition. * tree.h (EXPR_WFL_{NODE,FILENAME,FILENAME_NODE,LINENO, COLNO,LINECOL,SET_LINECOL,EMIT_LINE_NOTE}): New macros. (build_expr_wfl): New prototype declaration. * tree.c (build_expr_wfl): New function, to build EXPR_WITH_FILE_LOCATION nodes. (copy_node): Don't zero TREE_CHAIN if copying a EXPR_WITH_FILE_LOCATION node. * print-tree.c (print_node): Handle EXPR_WITH_FILE_LOCATION. * expr.c (expand_expr): Handle EXPR_WITH_FILE_LOCATION. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19049 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 1d5acc708c6..03af577247c 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -643,6 +643,17 @@ struct tree_vec
#define TREE_OPERAND(NODE, I) ((NODE)->exp.operands[I])
#define TREE_COMPLEXITY(NODE) ((NODE)->exp.complexity)
+/* In expression with file location information. */
+#define EXPR_WFL_NODE(NODE) TREE_OPERAND((NODE), 0)
+#define EXPR_WFL_FILENAME(NODE) (IDENTIFIER_POINTER ((NODE)->common.chain))
+#define EXPR_WFL_FILENAME_NODE(NODE) ((NODE)->common.chain)
+#define EXPR_WFL_LINENO(NODE) ((NODE)->exp.complexity >> 12)
+#define EXPR_WFL_COLNO(NODE) ((NODE)->exp.complexity & 0xfff)
+#define EXPR_WFL_LINECOL(NODE) ((NODE)->exp.complexity)
+#define EXPR_WFL_SET_LINECOL(NODE, LINE, COL) \
+ (EXPR_WFL_LINECOL(NODE) = ((LINE) << 12) | ((COL) & 0xfff))
+#define EXPR_WFL_EMIT_LINE_NOTE(NODE) ((NODE)->common.lang_flag_0)
+
struct tree_exp
{
char common[sizeof (struct tree_common)];
@@ -1296,6 +1307,7 @@ extern tree build_decl_list PROTO((tree, tree));
extern tree build_expr_list PROTO((tree, tree));
extern tree build_decl PROTO((enum tree_code, tree, tree));
extern tree build_block PROTO((tree, tree, tree, tree, tree));
+extern tree build_expr_wfl PROTO((tree, char *, int, int));
/* Construct various nodes representing data types. */
OpenPOWER on IntegriCloud