Commit 9fe9a2e1 by Alexandre Petit-Bianco Committed by Per Bothner

tree.c (build_expr_wfl): Use NULL_TREE if the file name is NULL.

�
        * tree.c (build_expr_wfl): Use NULL_TREE if the file name is NULL.
        Propagate TREE_SIDE_EFFECTS and TREE_TYPE iff the encapsulated
        node is non NULL. Cache last file name and file name identifier node.

From-SVN: r19234
parent a62e870c
...@@ -3232,12 +3232,23 @@ build_expr_wfl (node, file, line, col) ...@@ -3232,12 +3232,23 @@ build_expr_wfl (node, file, line, col)
char *file; char *file;
int line, col; int line, col;
{ {
static char *last_file = 0;
static tree last_filenode = NULL_TREE;
register tree wfl = make_node (EXPR_WITH_FILE_LOCATION); register tree wfl = make_node (EXPR_WITH_FILE_LOCATION);
EXPR_WFL_NODE (wfl) = node; EXPR_WFL_NODE (wfl) = node;
EXPR_WFL_FILENAME_NODE (wfl) = get_identifier (file);
EXPR_WFL_SET_LINECOL (wfl, line, col); EXPR_WFL_SET_LINECOL (wfl, line, col);
if (file != last_file)
{
last_file = file;
last_filenode = file ? get_identifier (file) : NULL_TREE;
}
EXPR_WFL_FILENAME_NODE (wfl) = last_filenode;
if (node)
{
TREE_SIDE_EFFECTS (wfl) = TREE_SIDE_EFFECTS (node); TREE_SIDE_EFFECTS (wfl) = TREE_SIDE_EFFECTS (node);
TREE_TYPE (wfl) = TREE_TYPE (node); TREE_TYPE (wfl) = TREE_TYPE (node);
}
return wfl; return wfl;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment