OSDN Git Service

2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
authormanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 7 Jul 2009 21:52:01 +0000 (21:52 +0000)
committermanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 7 Jul 2009 21:52:01 +0000 (21:52 +0000)
* 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

gcc/ChangeLog
gcc/ada/ChangeLog
gcc/ada/gcc-interface/trans.c
gcc/c-typeck.c
gcc/cp/ChangeLog
gcc/cp/semantics.c
gcc/gimplify.c
gcc/objc/ChangeLog
gcc/objc/objc-act.c
gcc/tree.c
gcc/tree.h

index 39cc552..8140cc3 100644 (file)
@@ -1,3 +1,13 @@
+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
index 0253a69..082756d 100644 (file)
@@ -1,3 +1,8 @@
+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
index 1008f1a..76200ab 100644 (file)
@@ -5846,7 +5846,7 @@ gnat_gimplify_expr (tree *expr_p, gimple_seq *pre_p,
 
          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);
index e86e095..f7df74e 100644 (file)
@@ -8674,7 +8674,7 @@ c_finish_stmt_expr (location_t loc, tree body)
     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);
index a0eedeb..aa28747 100644 (file)
@@ -1,3 +1,8 @@
+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
index 1b96ac2..aa52a36 100644 (file)
@@ -3334,7 +3334,7 @@ finalize_nrv_r (tree* tp, int* walk_subtrees, void* data)
       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.  */
index c5fb185..032228d 100644 (file)
@@ -610,7 +610,7 @@ internal_get_tmp_var (tree val, gimple_seq *pre_p, gimple_seq *post_p,
   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);
 
@@ -814,7 +814,7 @@ gimple_set_do_not_emit_location (gimple g)
   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)
@@ -854,7 +854,7 @@ annotate_all_with_location_after (gimple_seq seq, gimple_stmt_iterator gsi,
 }
 
 
-/* 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)
@@ -2375,7 +2375,7 @@ gimplify_call_expr (tree *expr_p, gimple_seq *pre_p, bool want_value)
            = 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.  */
@@ -7360,7 +7360,7 @@ gimplify_one_sizepos (tree *expr_p, gimple_seq *stmt_p)
       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);
     }
index 2268413..00475c1 100644 (file)
@@ -1,5 +1,10 @@
 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.
        
index 917caf1..23aae28 100644 (file)
@@ -3669,7 +3669,7 @@ next_sjlj_build_catch_list (void)
              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);
index 2718667..7c5f154 100644 (file)
@@ -3940,18 +3940,6 @@ expand_location (source_location loc)
 }
 
 \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.  */
index e2eb76e..cc00c6d 100644 (file)
@@ -1540,10 +1540,6 @@ struct GTY(()) tree_constructor {
 #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)
 
@@ -4858,8 +4854,6 @@ extern HOST_WIDEST_INT widest_int_cst_value (const_tree);
 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);