diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2004-07-07 10:21:04 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@codesourcery.com> | 2004-07-07 10:21:04 +0000 |
commit | fa6d9bab0321101676b69c5bb15489ced4d65132 (patch) | |
tree | f1107852a967ee8014a46e51df142dd36d2f7735 /gcc/cp/init.c | |
parent | 80f6748848d22280c6c2b789871be63de7de5054 (diff) |
* tree.h (TYPE_BINFO_OFFSET, TYPE_BINFO_VTABLE,
TYPE_BINFO_VIRTUALS, TYPE_BINFO_BASETYPES,
TYPE_BINFO_BASETYPE): Remove.
(BINFO_BASETYPES, BINFO_N_BASETYPES, BINFO_BASETYPE): Rename
to ...
(BINFO_BASE_BINFOS, BINFO_N_BASE_BINFOS, BINFO_BASE_BINFO): ...
here.
(BINFO_BASEACCESSES, BINFO_BASEACCESS): Rename to ...
(BINFO_BASE_ACCESSES, BINFO_BASE_ACCESS): ... here.
(BINFO_INHERITANCE_CHAIN): Redocument as it is actually used.
(struct tree_binfo): Rename base_types to base_binfos.
* alias.c (record_component_aliases): Adjust BINFO macros.
* dbxout.c (dbxout_type): Likewise.
* dwarf2out.c (gen_member_die): Likewise.
* sdbout.c (sdbout_one_type): Likewise.
* tree-dump.c (deque_and_dump): Likewise.
* config/i386/i386.c (classify_argument,
contains_128bit_aligned_vector_p): Likewise.
* cp/cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
* cp/class.c (build_primary_vtable, check_bases,
determine_primary_base, finish_struct_bits,
maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
get_basefndecls, warn_hidden, walk_subobject_offsets,
build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
finish_struct_1, get_vfield_name, contains_empty_class_p,
dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
BINFO macros.
* cp/decl.c (xref_basetypes): Likewise.
* cp/dump.c (cp_dump_tree): Likewise.
* cp/error.c (dump_expr): Likewise.
* cp/init.c (sort_mem_initializers, expand_member_init,
push_base_cleanups): Likewise.
* cp/method.c (do_build_copy_constructor, do_build_assign_reg,
synthesize_exception_spec): Likewise.
* cp/name-lookup.c (arg_assoc_class):
* cp/pt.c (instantiate_class_template, tsubst,
get_template_base_recursive):
* cp/ptree.c (cxx_print_type):
* cp/rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
* cp/search.c (lookup_base_r, dynamic_cast_base_recurse,
dfs_access_in_type, access_in_type, lookup_field_queue_p,
bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
binfo_for_vtable, copied_binfo, original_binfo): Likewise
* cp/tree.c (copy_base_binfos, make_binfo): Likewise.
* cp/typeck.c (commmon_base_type): Likewise
* cp/typeck2.c (process_init_constructor): Likewise
* java/java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
(TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
* java/class.c (set_super_info, class_depth, interface_of_p,
maybe_add_interface, add_interface, make_class_data,
layout_class, add_miranda_methods): Adjust BINFO macros.
* java/expr.c (can_widen_reference_to, lookup_field): Likewise.
* java/jcf-write.c (generate_classfile): Likewise.
* java/parse.y (patch_anonymous_class,
check_inner_circular_reference, check_circular_reference,
java_complete_class, check_abstract_method_definitions,
java_check_abstract_method_definitions,
check_interface_throws_clauses, java_check_abstract_methods,
lookup_java_interface_method2,
find_applicable_accessible_methods_list): Likewise.
* java/typeck.c (find_method_in_interface): Likewise.
* java/verify.c (merge_types): Likewise.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@84198 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r-- | gcc/cp/init.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 19e51cdaaa2..e899b01f1f4 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -475,9 +475,9 @@ sort_mem_initializers (tree t, tree mem_inits) sorted_inits = tree_cons (base, NULL_TREE, sorted_inits); /* Process the direct bases. */ - for (i = 0; i < CLASSTYPE_N_BASECLASSES (t); ++i) + for (i = 0; i < BINFO_N_BASE_BINFOS (TYPE_BINFO (t)); ++i) { - base = BINFO_BASETYPE (TYPE_BINFO (t), i); + base = BINFO_BASE_BINFO (TYPE_BINFO (t), i); if (!BINFO_VIRTUAL_P (base)) sorted_inits = tree_cons (base, NULL_TREE, sorted_inits); } @@ -941,14 +941,15 @@ expand_member_init (tree name) { /* This is an obsolete unnamed base class initializer. The parser will already have warned about its use. */ - switch (CLASSTYPE_N_BASECLASSES (current_class_type)) + switch (BINFO_N_BASE_BINFOS (TYPE_BINFO (current_class_type))) { case 0: error ("unnamed initializer for `%T', which has no base classes", current_class_type); return NULL_TREE; case 1: - basetype = TYPE_BINFO_BASETYPE (current_class_type, 0); + basetype = BINFO_TYPE + (BINFO_BASE_BINFO (TYPE_BINFO (current_class_type), 0)); break; default: error ("unnamed initializer for `%T', which uses multiple inheritance", @@ -981,11 +982,12 @@ expand_member_init (tree name) virtual_binfo = NULL_TREE; /* Look for a direct base. */ - for (i = 0; i < BINFO_N_BASETYPES (class_binfo); ++i) - if (same_type_p (basetype, - TYPE_BINFO_BASETYPE (current_class_type, i))) + for (i = 0; i < BINFO_N_BASE_BINFOS (class_binfo); ++i) + if (same_type_p + (basetype, BINFO_TYPE + (BINFO_BASE_BINFO (TYPE_BINFO (current_class_type), i)))) { - direct_binfo = BINFO_BASETYPE (class_binfo, i); + direct_binfo = BINFO_BASE_BINFO (class_binfo, i); break; } /* Look for a virtual base -- unless the direct base is itself @@ -2910,8 +2912,8 @@ push_base_cleanups (void) } } - binfos = BINFO_BASETYPES (TYPE_BINFO (current_class_type)); - n_baseclasses = CLASSTYPE_N_BASECLASSES (current_class_type); + binfos = BINFO_BASE_BINFOS (TYPE_BINFO (current_class_type)); + n_baseclasses = BINFO_N_BASE_BINFOS (TYPE_BINFO (current_class_type)); /* Take care of the remaining baseclasses. */ for (i = 0; i < n_baseclasses; i++) |