This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Remove get_vtt_name


The following patches removes the function get_vtt_name from class.c.

The function just provides another name for mangle_vtt_for_type
and is used only once.
The patch adjusts the caller to use mangle_vtt_for_type directly
and removes get_vtt_name and its prototype.

Bootstrapped and regtested on x86_64-unknown-linux-gnu.
Ok for mainline?

Regards,
Volker

:ADDPATCH C++:


2006-01-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>

	* cp-tree.h (get_vtt_name): Remove prototype.
	* class.c (get_vtt_name): Remove.
	(build_vtt): Call mangle_vtt_for_type instead of get_vtt_name.

======================================================================
--- gcc/gcc/cp/cp-tree.h	2006-01-03 09:41:21 +0100
+++ gcc/gcc/cp/cp-tree.h	2006-01-22 19:01:19 +0100
@@ -3740,7 +3740,6 @@ extern void invalidate_class_lookup_cach
 extern void maybe_note_name_used_in_class	(tree, tree);
 extern void note_name_declared_in_class		(tree, tree);
 extern tree get_vtbl_decl_for_binfo		(tree);
-extern tree get_vtt_name			(tree);
 extern tree get_primary_binfo			(tree);
 extern void debug_class				(tree);
 extern void debug_thunks			(tree);
======================================================================
--- gcc/gcc/cp/class.c	2006-01-03 09:41:21 +0100
+++ gcc/gcc/cp/class.c	2006-01-22 19:01:47 +0100
@@ -628,15 +628,6 @@ get_vtable_name (tree type)
   return mangle_vtbl_for_type (type);
 }
 
-/* Return an IDENTIFIER_NODE for the name of the virtual table table
-   for TYPE.  */
-
-tree
-get_vtt_name (tree type)
-{
-  return mangle_vtt_for_type (type);
-}
-
 /* DECL is an entity associated with TYPE, like a virtual table or an
    implicitly generated constructor.  Determine whether or not DECL
    should have external or internal linkage at the object file
@@ -6683,7 +6674,7 @@ build_vtt (tree t)
   type = build_cplus_array_type (const_ptr_type_node, type);
 
   /* Now, build the VTT object itself.  */
-  vtt = build_vtable (t, get_vtt_name (t), type);
+  vtt = build_vtable (t, mangle_vtt_for_type (t), type);
   initialize_artificial_var (vtt, inits);
   /* Add the VTT to the vtables list.  */
   TREE_CHAIN (vtt) = TREE_CHAIN (CLASSTYPE_VTABLES (t));
======================================================================



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]