diff options
author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-20 12:26:02 +0000 |
---|---|---|
committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-20 12:26:02 +0000 |
commit | f6cc6a0817157a9069e1989d975a08a7e299cb9f (patch) | |
tree | d4f6d97c6ff518d744dc34b2b6c955e9348bb0b0 /gcc/dbxout.c | |
parent | f62ed60b214f15bdb21842816457e0a6ad09c056 (diff) | |
download | gcc-f6cc6a0817157a9069e1989d975a08a7e299cb9f.tar.gz |
.:
* tree.h: Include vec.h
(DEF_VEC_P(tree)): New type.
(BINFO_BASE_BINFOS, BINFO_N_BASE_BINFOS, BINFO_BASE_BINFO): Adjust.
(BINFO_BASE_APPEND, BINFO_BASE_ITERATE): New.
(BINFO_LANG_SLOT): Remove.
(BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF): New.
(struct tree_binfo): Turn base_binfos into a trailing
VEC(tree). Add vtt_subvtt, vtt_vptr, primary fields.
(binfo_lang_slots): Remove.
* tree.c (binfo_lang_slots): Remove.
(make_tree_binfo_stat): Take a base binfo count, not a
lang slot count. Adjust.
* Makefile.in (TREE_H): Add vec.h
* alias.c (record_component_aliases): Adjust BINFO access.
* 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.
* config/sh/symbian.c (symbian_export_vtable_and_rtti_p): Likewise.
* doc/c-tree.texi (Classes): Update BINFO documentation.
cp:
* cp-tree.h (DEF_VEC_P(tree)): Remove here.
(BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
Moved to common.
(BINFO_LANG_SLOTS): Remove.
* tree.c (copy_binfo): Adjust BINFO creation and accessors.
* decl.c (xref_basetypes): Adjust BINFO creation and accessors.
* class.c (check_bases): Adjust BINFO accessors.
(determine_primary_base, finish_struct_bits,
maybe_warn_about_overly_private_class, warn_hidden,
walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
warn_about_ambiguous_bases, get_vfield_name,
dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
add_vcall_offset_vtbl_entries_r): Likewise.
* dump.c (cp_dump_tree): Likewise.
* init.c (sort_mem_initializers, expand_member_init, build_delete,
push_base_cleanups): Likewise.
* method.c (do_build_copy_constructor, do_build_assign_ref,
synthesize_exception_spec): Likewise.
name-lookup.c (arg_assoc_class): Likewise.
* pt.c (instantiate_class_template,
get_template_base_recursive): Likewise.
* rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
* typeck2.c (process_init_constructor): Likewise.
* search.c (lookup_base_r, dynamic_cast_base_recurse,
dfs_access_in_type, dfs_walk_real, look_for_overrides,
types_overlap_p, copied_binfo, original_binfo): Likewise.
(binfo_for_vtable): Remove
java:
* class.c (add_interface_do): Remove.
(set_super_info, interface_of_p, maybe_add_interface,
add_interface, make_class_data, layout_class,
add_miranda_methods): Adjust BINFO accessors and addition.
* expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
accessors.
* jcf-write.c (generate_classfile): Likewise.
* 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): Adjust BINFO accessors
and addition.
* typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84949 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dbxout.c')
-rw-r--r-- | gcc/dbxout.c | 120 |
1 files changed, 62 insertions, 58 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c index aa863bda031..c888dd08875 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -1633,10 +1633,7 @@ dbxout_type (tree type, int full) case UNION_TYPE: case QUAL_UNION_TYPE: { - int i, n_baseclasses = 0; - - if (TYPE_BINFO (type) && BINFO_BASE_BINFOS (TYPE_BINFO (type))) - n_baseclasses = BINFO_N_BASE_BINFOS (TYPE_BINFO (type)); + tree binfo = TYPE_BINFO (type); /* Output a structure type. We must use the same test here as we use in the DBX_NO_XREFS case above. */ @@ -1683,65 +1680,72 @@ dbxout_type (tree type, int full) CHARS (1); print_wide_int (int_size_in_bytes (type)); - if (use_gnu_debug_info_extensions) - { - if (n_baseclasses) - { - have_used_extensions = 1; - fprintf (asmfile, "!%d,", n_baseclasses); - CHARS (8); - } - } - for (i = 0; i < n_baseclasses; i++) + if (binfo) { - tree binfo = TYPE_BINFO (type); - tree child = BINFO_BASE_BINFO (binfo, i); - tree access = (BINFO_BASE_ACCESSES (binfo) - ? BINFO_BASE_ACCESS (binfo, i) : access_public_node); - + int i; + tree child; + if (use_gnu_debug_info_extensions) { - have_used_extensions = 1; - putc (BINFO_VIRTUAL_P (child) ? '1' : '0', asmfile); - putc (access == access_public_node ? '2' : - (access == access_protected_node ? '1' :'0'), - asmfile); - CHARS (2); - if (BINFO_VIRTUAL_P (child) - && strcmp (lang_hooks.name, "GNU C++") == 0) - /* For a virtual base, print the (negative) offset within - the vtable where we must look to find the necessary - adjustment. */ - print_wide_int (tree_low_cst (BINFO_VPTR_FIELD (child), 0) - * BITS_PER_UNIT); - else - print_wide_int (tree_low_cst (BINFO_OFFSET (child), 0) - * BITS_PER_UNIT); - putc (',', asmfile); - CHARS (1); - dbxout_type (BINFO_TYPE (child), 0); - putc (';', asmfile); - CHARS (1); + if (BINFO_N_BASE_BINFOS (binfo)) + { + have_used_extensions = 1; + fprintf (asmfile, "!%d,", BINFO_N_BASE_BINFOS (binfo)); + CHARS (8); + } } - else + for (i = 0; BINFO_BASE_ITERATE (binfo, i, child); i++) { - /* Print out the base class information with fields - which have the same names at the types they hold. */ - dbxout_type_name (BINFO_TYPE (child)); - putc (':', asmfile); - CHARS (1); - dbxout_type (BINFO_TYPE (child), full); - putc (',', asmfile); - CHARS (1); - print_wide_int (tree_low_cst (BINFO_OFFSET (child), 0) - * BITS_PER_UNIT); - putc (',', asmfile); - CHARS (1); - print_wide_int (tree_low_cst (TYPE_SIZE (BINFO_TYPE (child)), - 0) - * BITS_PER_UNIT); - putc (';', asmfile); - CHARS (1); + tree access = (BINFO_BASE_ACCESSES (binfo) + ? BINFO_BASE_ACCESS (binfo, i) + : access_public_node); + + if (use_gnu_debug_info_extensions) + { + have_used_extensions = 1; + putc (BINFO_VIRTUAL_P (child) ? '1' : '0', asmfile); + putc (access == access_public_node ? '2' : + (access == access_protected_node ? '1' :'0'), + asmfile); + CHARS (2); + if (BINFO_VIRTUAL_P (child) + && strcmp (lang_hooks.name, "GNU C++") == 0) + /* For a virtual base, print the (negative) + offset within the vtable where we must look + to find the necessary adjustment. */ + print_wide_int + (tree_low_cst (BINFO_VPTR_FIELD (child), 0) + * BITS_PER_UNIT); + else + print_wide_int (tree_low_cst (BINFO_OFFSET (child), 0) + * BITS_PER_UNIT); + putc (',', asmfile); + CHARS (1); + dbxout_type (BINFO_TYPE (child), 0); + putc (';', asmfile); + CHARS (1); + } + else + { + /* Print out the base class information with + fields which have the same names at the types + they hold. */ + dbxout_type_name (BINFO_TYPE (child)); + putc (':', asmfile); + CHARS (1); + dbxout_type (BINFO_TYPE (child), full); + putc (',', asmfile); + CHARS (1); + print_wide_int (tree_low_cst (BINFO_OFFSET (child), 0) + * BITS_PER_UNIT); + putc (',', asmfile); + CHARS (1); + print_wide_int + (tree_low_cst (TYPE_SIZE (BINFO_TYPE (child)), 0) + * BITS_PER_UNIT); + putc (';', asmfile); + CHARS (1); + } } } } |