aboutsummaryrefslogtreecommitdiff
path: root/gcc/print-tree.c
diff options
context:
space:
mode:
authorAlexandre Petit-Bianco <apbianco@cygnus.com>1998-04-08 14:03:48 +0000
committerPer Bothner <bothner@gcc.gnu.org>1998-04-08 07:03:48 -0700
commitbf1e5319c3c6a2e26470ca5e17340fff30b9510e (patch)
treeda1bfbbe113dd95c4e32fc4661d73298fc0876a6 /gcc/print-tree.c
parent1382bac6e8cd0595741e2d69e38e585232b73eba (diff)
downloadgcc-bf1e5319c3c6a2e26470ca5e17340fff30b9510e.zip
gcc-bf1e5319c3c6a2e26470ca5e17340fff30b9510e.tar.gz
gcc-bf1e5319c3c6a2e26470ca5e17340fff30b9510e.tar.bz2
tree.def (EXPR_WITH_FILE_LOCATION): New tree node definition.
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. From-SVN: r19049
Diffstat (limited to 'gcc/print-tree.c')
-rw-r--r--gcc/print-tree.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/print-tree.c b/gcc/print-tree.c
index 7f37e82..6674a18 100644
--- a/gcc/print-tree.c
+++ b/gcc/print-tree.c
@@ -571,6 +571,15 @@ print_node (file, prefix, node, indent)
print_node (file, temp, TREE_OPERAND (node, i), indent + 4);
}
}
+
+ if (TREE_CODE (node) == EXPR_WITH_FILE_LOCATION)
+ {
+ indent_to (file, indent+4);
+ fprintf (file, "%s:%d:%d",
+ (EXPR_WFL_FILENAME_NODE (node ) ?
+ EXPR_WFL_FILENAME (node) : "(no file info)"),
+ EXPR_WFL_LINENO (node), EXPR_WFL_COLNO (node));
+ }
break;
case 'c':