* tree.c (set_expr_locus): Remove.
* tree.h (EXPR_LOCUS,SET_EXPR_LOCUS,set_expr_locus): Remove.
* c-typeck.c (c_finish_stmt_expr): Replace EXPR_LOCUS by
EXPR_LOCATION.
* gimplify.c (internal_get_tmp_var): Likewise.
(gimplify_call_expr): Likewise.
(gimplify_one_sizepos): Likewise.
objc/
* objc-act.c (next_sjlj_build_catch_list): Replace EXPR_LOCUS by
EXPR_LOCATION.
cp/
* semantics.c (finalize_nrv_r): Replace EXPR_LOCUS by
EXPR_LOCATION.
ada/
* gcc-interface/trans.c (gnat_gimplify_expr): Replace EXPR_LOCUS by
EXPR_LOCATION.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149350
138bc75d-0d04-0410-961f-
82ee72b054a4
+2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ * tree.c (set_expr_locus): Remove.
+ * tree.h (EXPR_LOCUS,SET_EXPR_LOCUS,set_expr_locus): Remove.
+ * c-typeck.c (c_finish_stmt_expr): Replace EXPR_LOCUS by
+ EXPR_LOCATION.
+ * gimplify.c (internal_get_tmp_var): Likewise.
+ (gimplify_call_expr): Likewise.
+ (gimplify_one_sizepos): Likewise.
+
2009-07-07 Eric Botcazou <ebotcazou@adacore.com>
PR debug/40666
+2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ * gcc-interface/trans.c (gnat_gimplify_expr): Replace EXPR_LOCUS by
+ EXPR_LOCATION.
+
2009-07-07 Gary Dismukes <dismukes@adacore.com>
* exp_ch6.adb (Expand_Actuals): Call Add_Call_By_Copy_Code for in out
stmt = gimplify_assign (new_var, op, pre_p);
if (EXPR_HAS_LOCATION (op))
- gimple_set_location (stmt, *EXPR_LOCUS (op));
+ gimple_set_location (stmt, EXPR_LOCATION (op));
TREE_OPERAND (expr, 0) = new_var;
recompute_tree_invariant_for_addr_expr (expr);
val = TREE_OPERAND (val, 0);
*last_p = build2 (MODIFY_EXPR, void_type_node, tmp, val);
- SET_EXPR_LOCUS (*last_p, EXPR_LOCUS (last));
+ SET_EXPR_LOCATION (*last_p, EXPR_LOCATION (last));
{
tree t = build4 (TARGET_EXPR, type, tmp, body, NULL_TREE, NULL_TREE);
+2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ * semantics.c (finalize_nrv_r): Replace EXPR_LOCUS by
+ EXPR_LOCATION.
+
2009-07-07 Jason Merrill <jason@redhat.com>
PR c++/37816
else
init = build_empty_stmt (EXPR_LOCATION (*tp));
DECL_INITIAL (dp->var) = NULL_TREE;
- SET_EXPR_LOCUS (init, EXPR_LOCUS (*tp));
+ SET_EXPR_LOCATION (init, EXPR_LOCATION (*tp));
*tp = init;
}
/* And replace all uses of the NRV with the RESULT_DECL. */
mod = build2 (INIT_EXPR, TREE_TYPE (t), t, unshare_expr (val));
if (EXPR_HAS_LOCATION (val))
- SET_EXPR_LOCUS (mod, EXPR_LOCUS (val));
+ SET_EXPR_LOCATION (mod, EXPR_LOCATION (val));
else
SET_EXPR_LOCATION (mod, input_location);
gimple_set_plf (g, GF_PLF_1, true);
}
-/* Set the location for gimple statement GS to LOCUS. */
+/* Set the location for gimple statement GS to LOCATION. */
static void
annotate_one_with_location (gimple gs, location_t location)
}
-/* Set the location for all the statements in a sequence STMT_P to LOCUS. */
+/* Set the location for all the statements in a sequence STMT_P to LOCATION. */
void
annotate_all_with_location (gimple_seq stmt_p, location_t location)
= CALL_EXPR_RETURN_SLOT_OPT (call);
CALL_FROM_THUNK_P (*expr_p) = CALL_FROM_THUNK_P (call);
CALL_CANNOT_INLINE_P (*expr_p) = CALL_CANNOT_INLINE_P (call);
- SET_EXPR_LOCUS (*expr_p, EXPR_LOCUS (call));
+ SET_EXPR_LOCATION (*expr_p, EXPR_LOCATION (call));
TREE_BLOCK (*expr_p) = TREE_BLOCK (call);
/* Set CALL_EXPR_VA_ARG_PACK. */
tmp = build1 (NOP_EXPR, type, expr);
stmt = gimplify_assign (*expr_p, tmp, stmt_p);
if (EXPR_HAS_LOCATION (expr))
- gimple_set_location (stmt, *EXPR_LOCUS (expr));
+ gimple_set_location (stmt, EXPR_LOCATION (expr));
else
gimple_set_location (stmt, input_location);
}
2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
+ * objc-act.c (next_sjlj_build_catch_list): Replace EXPR_LOCUS by
+ EXPR_LOCATION.
+
+2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
* objc-act.c: Replace %J by an explicit location. Update all
calls.
cond = c_common_truthvalue_conversion (input_location, t);
}
t = build3 (COND_EXPR, void_type_node, cond, body, NULL);
- SET_EXPR_LOCUS (t, EXPR_LOCUS (stmt));
+ SET_EXPR_LOCATION (t, EXPR_LOCATION (stmt));
*last = t;
last = &COND_EXPR_ELSE (t);
}
\f
-/* Source location accessor functions. */
-
-
-void
-set_expr_locus (tree node, source_location *loc)
-{
- if (loc == NULL)
- EXPR_CHECK (node)->exp.locus = UNKNOWN_LOCATION;
- else
- EXPR_CHECK (node)->exp.locus = *loc;
-}
-
/* Like SET_EXPR_LOCATION, but make sure the tree can have a location.
LOC is the location to use in tree T. */
#define EXPR_LOCATION(NODE) (EXPR_P ((NODE)) ? (NODE)->exp.locus : UNKNOWN_LOCATION)
#define SET_EXPR_LOCATION(NODE, LOCUS) EXPR_CHECK ((NODE))->exp.locus = (LOCUS)
#define EXPR_HAS_LOCATION(NODE) (EXPR_LOCATION (NODE) != UNKNOWN_LOCATION)
-#define EXPR_LOCUS(NODE) (EXPR_P (NODE) \
- ? CONST_CAST (source_location *, &(NODE)->exp.locus) \
- : (source_location *) NULL)
-#define SET_EXPR_LOCUS(NODE, FROM) set_expr_locus ((NODE), (FROM))
#define EXPR_FILENAME(NODE) LOCATION_FILE (EXPR_CHECK ((NODE))->exp.locus)
#define EXPR_LINENO(NODE) LOCATION_LINE (EXPR_CHECK (NODE)->exp.locus)
extern bool fields_compatible_p (const_tree, const_tree);
extern tree find_compatible_field (tree, tree);
-extern void set_expr_locus (tree, source_location *);
-
extern tree *tree_block (tree);
extern location_t *block_nonartificial_location (tree);
extern location_t tree_nonartificial_location (tree);