aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/vtable-class-hierarchy.c
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2015-06-27 10:39:31 +0000
committerMarek Polacek <mpolacek@gcc.gnu.org>2015-06-27 10:39:31 +0000
commit56a6f1d33f7259fde0efc9c37a1308c306590e8b (patch)
tree9b8f8950e8b14ba068d68929c14b53ae3b8d5efd /gcc/cp/vtable-class-hierarchy.c
parente1cc235523d628789a026065a8b6970c8eb6014e (diff)
downloadgcc-56a6f1d33f7259fde0efc9c37a1308c306590e8b.zip
gcc-56a6f1d33f7259fde0efc9c37a1308c306590e8b.tar.gz
gcc-56a6f1d33f7259fde0efc9c37a1308c306590e8b.tar.bz2
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
Diffstat (limited to 'gcc/cp/vtable-class-hierarchy.c')
-rw-r--r--gcc/cp/vtable-class-hierarchy.c6
1 files changed, 3 insertions, 3 deletions
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<tree> 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)