Commit 3a65ee74 by Marek Polacek Committed by Marek Polacek

gimple-fold.c (fold_const_aggregate_ref_1): Use DECL_P.

	* gimple-fold.c (fold_const_aggregate_ref_1): Use DECL_P.
	* gimplify.c (gimplify_modify_expr_rhs): Likewise.

	* c-ada-spec.c (dump_sloc): Use DECL_P.

From-SVN: r223440
parent 7bd11911
2015-05-20 Marek Polacek <polacek@redhat.com>
* gimple-fold.c (fold_const_aggregate_ref_1): Use DECL_P.
* gimplify.c (gimplify_modify_expr_rhs): Likewise.
2015-05-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com> 2015-05-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64.c (aarch64_class_max_nregs): * config/aarch64/aarch64.c (aarch64_class_max_nregs):
......
2015-05-20 Marek Polacek <polacek@redhat.com> 2015-05-20 Marek Polacek <polacek@redhat.com>
* c-ada-spec.c (dump_sloc): Use DECL_P.
2015-05-20 Marek Polacek <polacek@redhat.com>
* c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout. * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
* c-common.c: Likewise. * c-common.c: Likewise.
......
...@@ -1629,7 +1629,7 @@ dump_sloc (pretty_printer *buffer, tree node) ...@@ -1629,7 +1629,7 @@ dump_sloc (pretty_printer *buffer, tree node)
xloc.file = NULL; xloc.file = NULL;
if (TREE_CODE_CLASS (TREE_CODE (node)) == tcc_declaration) if (DECL_P (node))
xloc = expand_location (DECL_SOURCE_LOCATION (node)); xloc = expand_location (DECL_SOURCE_LOCATION (node));
else if (EXPR_HAS_LOCATION (node)) else if (EXPR_HAS_LOCATION (node))
xloc = expand_location (EXPR_LOCATION (node)); xloc = expand_location (EXPR_LOCATION (node));
......
...@@ -5518,7 +5518,7 @@ fold_const_aggregate_ref_1 (tree t, tree (*valueize) (tree)) ...@@ -5518,7 +5518,7 @@ fold_const_aggregate_ref_1 (tree t, tree (*valueize) (tree))
if (TREE_THIS_VOLATILE (t)) if (TREE_THIS_VOLATILE (t))
return NULL_TREE; return NULL_TREE;
if (TREE_CODE_CLASS (TREE_CODE (t)) == tcc_declaration) if (DECL_P (t))
return get_symbol_constant_value (t); return get_symbol_constant_value (t);
tem = fold_read_from_constant_string (t); tem = fold_read_from_constant_string (t);
......
...@@ -4222,7 +4222,7 @@ gimplify_modify_expr_rhs (tree *expr_p, tree *from_p, tree *to_p, ...@@ -4222,7 +4222,7 @@ gimplify_modify_expr_rhs (tree *expr_p, tree *from_p, tree *to_p,
{ {
if (TREE_THIS_VOLATILE (t) != volatile_p) if (TREE_THIS_VOLATILE (t) != volatile_p)
{ {
if (TREE_CODE_CLASS (TREE_CODE (t)) == tcc_declaration) if (DECL_P (t))
t = build_simple_mem_ref_loc (EXPR_LOCATION (*from_p), t = build_simple_mem_ref_loc (EXPR_LOCATION (*from_p),
build_fold_addr_expr (t)); build_fold_addr_expr (t));
if (REFERENCE_CLASS_P (t)) if (REFERENCE_CLASS_P (t))
......
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