aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-gimplify.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/cp-gimplify.c')
-rw-r--r--gcc/cp/cp-gimplify.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c
index 3999695..f326d71 100644
--- a/gcc/cp/cp-gimplify.c
+++ b/gcc/cp/cp-gimplify.c
@@ -226,8 +226,7 @@ genericize_if_stmt (tree *stmt_p)
stmt = else_;
else
stmt = build3 (COND_EXPR, void_type_node, cond, then_, else_);
- if (!EXPR_HAS_LOCATION (stmt))
- protected_set_expr_location (stmt, locus);
+ protected_set_expr_location_if_unset (stmt, locus);
*stmt_p = stmt;
}
@@ -248,8 +247,7 @@ genericize_cp_loop (tree *stmt_p, location_t start_locus, tree cond, tree body,
tree stmt_list = NULL;
tree debug_begin = NULL;
- if (EXPR_LOCATION (incr) == UNKNOWN_LOCATION)
- protected_set_expr_location (incr, start_locus);
+ protected_set_expr_location_if_unset (incr, start_locus);
cp_walk_tree (&cond, cp_genericize_r, data, NULL);
cp_walk_tree (&incr, cp_genericize_r, data, NULL);