aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/method.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2000-05-22 01:08:46 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2000-05-22 01:08:46 +0000
commit2365615885b83d1ff2644318846aa173628dccf4 (patch)
treea3ce5a7731f9c1eb90d7f0928f3936935b196047 /gcc/cp/method.c
parentf85cf63648f6612b7638347f387ba2971ddaf820 (diff)
downloadgcc-2365615885b83d1ff2644318846aa173628dccf4.zip
gcc-2365615885b83d1ff2644318846aa173628dccf4.tar.gz
gcc-2365615885b83d1ff2644318846aa173628dccf4.tar.bz2
cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
* cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks. (VTT_NAME_PREFIX): New macro. (CTOR_VTBL_NAME_PREFIX): Likewise. (get_ctor_vtbl_name): New function. * class.c (get_vtable_name): Simplify. (get_vtt_name): New function. (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE. (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list when a virtual base becomes primary. (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build VTTs. (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in additional parameters. (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED. (initialize_array): New function. (build_vtt): Likewise. (build_vtt_inits): Likewise. (dfs_build_vtt_inits): Likewise. (dfs_fixup_binfo_vtbls): Likewise. (build_ctor_vtbl_group): Likewise. (initialize_vtable): Use initialize_array. (accumulate_vtbl_inits): Reimplement to handle construction vtables. (dfs_accumulate_vtbl_inits): Likewise. (bulid_vtbl_initializer): Adjust parameter name. * method.c (build_typename_overload): Remove #if 0'd code. (get_ctor_vtbl_name): New function. * search.c (dfs_walk_real): Use BINFO_N_BASETYPES. (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo. From-SVN: r34069
Diffstat (limited to 'gcc/cp/method.c')
-rw-r--r--gcc/cp/method.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 81df59a..bbb580d 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -1766,9 +1766,6 @@ build_typename_overload (type)
build_mangled_name (type, 0, 1);
id = get_identifier (obstack_base (&scratch_obstack));
IDENTIFIER_OPNAME_P (id) = 1;
-#if 0
- IDENTIFIER_GLOBAL_VALUE (id) = TYPE_MAIN_DECL (type);
-#endif
TREE_TYPE (id) = type;
end_squangling ();
return id;
@@ -1800,6 +1797,28 @@ get_id_2 (name, name2)
return get_identifier (obstack_base (&scratch_obstack));
}
+/* Returns the name of a construction vtable group. TYPE is the most
+ derived class in the hierarhcy. BINFO is the most derived class in
+ the construction vtable group. */
+
+tree
+get_ctor_vtbl_name (type, binfo)
+ tree type;
+ tree binfo;
+{
+ start_squangling ();
+ OB_INIT ();
+ OB_PUTCP (CTOR_VTBL_NAME_PREFIX);
+ build_mangled_name (type, 0, 0);
+ OB_PUTC ('_');
+ build_mangled_name (BINFO_TYPE (binfo), 0, 0);
+ OB_PUTC ('_');
+ build_overload_int (BINFO_OFFSET (binfo), mf_none);
+ OB_FINISH ();
+ end_squangling ();
+ return get_identifier (obstack_base (&scratch_obstack));
+}
+
/* Returns a DECL_ASSEMBLER_NAME for the destructor of type TYPE. */
tree