From 56a6f1d33f7259fde0efc9c37a1308c306590e8b Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Sat, 27 Jun 2015 10:39:31 +0000 Subject: call.c (set_up_extended_ref_temp): Use VAR_P. * call.c (set_up_extended_ref_temp): Use VAR_P. * class.c: Use VAR_P throughout. * constexpr.c (cxx_eval_constant_expression): Use VAR_P. * cp-array-notation.c (make_triplet_val_inv): Likewise. * decl.c: Use VAR_OR_FUNCTION_DECL_P or VAR_P throughout. * decl2.c: Likewise. * error.c (dump_decl): Use VAR_P. * mangle.c (decl_implicit_alias_p): Likewise. * parser.c: Use VAR_P throughout. * pt.c: Likewise. * semantics.c: Likewise. * vtable-class-hierarchy.c: Likewise. * tree.c (handle_abi_tag_attribute): Use VAR_OR_FUNCTION_DECL_P. From-SVN: r225098 --- gcc/cp/vtable-class-hierarchy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gcc/cp/vtable-class-hierarchy.c') diff --git a/gcc/cp/vtable-class-hierarchy.c b/gcc/cp/vtable-class-hierarchy.c index a1582e7..2c59f14 100644 --- a/gcc/cp/vtable-class-hierarchy.c +++ b/gcc/cp/vtable-class-hierarchy.c @@ -557,11 +557,11 @@ register_construction_vtables (tree base_class, tree record_type, if (TREE_OPERAND (value, 0)) val_vtbl_decl = TREE_OPERAND (value, 0); - while (TREE_CODE (val_vtbl_decl) != VAR_DECL + while (!VAR_P (val_vtbl_decl) && TREE_OPERAND (val_vtbl_decl, 0)) val_vtbl_decl = TREE_OPERAND (val_vtbl_decl, 0); - gcc_assert (TREE_CODE (val_vtbl_decl) == VAR_DECL); + gcc_assert (VAR_P (val_vtbl_decl)); /* Check to see if we already have this vtable pointer in our valid set for this base class. */ @@ -876,7 +876,7 @@ output_set_info (tree record_type, vec vtbl_ptr_array) if (TREE_CODE (arg0) == ADDR_EXPR) arg0 = TREE_OPERAND (arg0, 0); - if (TREE_CODE (arg0) == VAR_DECL) + if (VAR_P (arg0)) vptr_name = IDENTIFIER_POINTER (DECL_NAME (arg0)); if (TREE_CODE (arg1) == INTEGER_CST) -- cgit v1.1