From 839b422f0838f87583907b8146e9fc7ad111cad0 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Thu, 21 Mar 2013 11:53:39 +0000 Subject: tree.h (DECL_DEBUG_EXPR_IS_FROM): Rename to ... 2013-03-21 Richard Biener * tree.h (DECL_DEBUG_EXPR_IS_FROM): Rename to ... (DECL_HAS_DEBUG_EXPR_P): ... this. Guard properly. * tree.c (copy_node_stat): Do not copy DECL_HAS_DEBUG_EXPR_P. * dwarf2out.c (add_var_loc_to_decl): Use DECL_HAS_DEBUG_EXPR_P instead of DECL_DEBUG_EXPR_IS_FROM. * gimplify.c (gimplify_modify_expr): Likewise. * tree-cfg.c (verify_expr_location_1): Likewise. * tree-complex.c (create_one_component_var): Likewise. * tree-sra.c (create_access_replacement): Likewise. * tree-ssa-live.c (clear_unused_block_pointer_1): Likewise. (clear_unused_block_pointer): Likewise. * tree-streamer-in.c (unpack_ts_decl_common_value_fields): Likewise. * tree-streamer-out.c (pack_ts_decl_common_value_fields): Likewise. * var-tracking.c (var_debug_decl): Likewise. (track_expr_p): Likewise. * tree-inline.c (add_local_variables): Likewise. Set DECL_HAS_DEBUG_EXPR_P after copying it. * tree-diagnostic.c (default_tree_printer): Use DECL_HAS_DEBUG_EXPR_P instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly. c/ * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly. cp/ * error.c (cp_printer): Use DECL_HAS_DEBUG_EXPR_P instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly. From-SVN: r196864 --- gcc/var-tracking.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'gcc/var-tracking.c') diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c index 0db1562..4855fb1 100644 --- a/gcc/var-tracking.c +++ b/gcc/var-tracking.c @@ -1780,11 +1780,11 @@ vars_copy (htab_t dst, htab_t src) static inline tree var_debug_decl (tree decl) { - if (decl && DECL_P (decl) - && DECL_DEBUG_EXPR_IS_FROM (decl)) + if (decl && TREE_CODE (decl) == VAR_DECL + && DECL_HAS_DEBUG_EXPR_P (decl)) { tree debugdecl = DECL_DEBUG_EXPR (decl); - if (debugdecl && DECL_P (debugdecl)) + if (DECL_P (debugdecl)) decl = debugdecl; } @@ -5041,12 +5041,10 @@ track_expr_p (tree expr, bool need_rtl) don't need to track this expression if the ultimate declaration is ignored. */ realdecl = expr; - if (DECL_DEBUG_EXPR_IS_FROM (realdecl)) + if (TREE_CODE (realdecl) == VAR_DECL && DECL_HAS_DEBUG_EXPR_P (realdecl)) { realdecl = DECL_DEBUG_EXPR (realdecl); - if (realdecl == NULL_TREE) - realdecl = expr; - else if (!DECL_P (realdecl)) + if (!DECL_P (realdecl)) { if (handled_component_p (realdecl) || (TREE_CODE (realdecl) == MEM_REF -- cgit v1.1