This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[RFA PATCH] Make cp/mangle.c:mangle_decl do what the comment says
- From: Phil Edwards <phil at jaj dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 10 Feb 2003 17:37:01 -0500
- Subject: [RFA PATCH] Make cp/mangle.c:mangle_decl do what the comment says
The doc at the top of mangle.c says that mangle_decl "returns an identifier
containing the mangled name for a decl." Except that it doesn't.
This seems an obvious change. Built on i686/linux. Okay for trunk?
2003-02-10 Phil Edwards <pme@gcc.gnu.org>
* cp-tree.h (mangle_decl): Change return type to tree.
* mangle.c (mangle_decl): Return mangled id.
Index: cp-tree.h
===================================================================
RCS file: /home/pme/Repositories/GCC/gcc/gcc/cp/cp-tree.h,v
retrieving revision 1.809
diff -u -3 -p -r1.809 cp-tree.h
--- cp-tree.h 31 Jan 2003 14:46:52 -0000 1.809
+++ cp-tree.h 10 Feb 2003 20:34:45 -0000
@@ -4442,7 +4442,7 @@ extern tree merge_exception_specifiers
/* in mangle.c */
extern void init_mangle (void);
-extern void mangle_decl (tree);
+extern tree mangle_decl (tree);
extern const char *mangle_type_string (tree);
extern tree mangle_type (tree);
extern tree mangle_typeinfo_for_type (tree);
Index: mangle.c
===================================================================
RCS file: /home/pme/Repositories/GCC/gcc/gcc/cp/mangle.c,v
retrieving revision 1.66
diff -u -3 -p -r1.66 mangle.c
--- mangle.c 1 Jan 2003 11:58:57 -0000 1.66
+++ mangle.c 10 Feb 2003 20:34:45 -0000
@@ -2398,13 +2398,14 @@ mangle_decl_string (decl)
/* Create an identifier for the external mangled name of DECL. */
-void
+tree
mangle_decl (decl)
tree decl;
{
tree id = get_identifier (mangle_decl_string (decl));
SET_DECL_ASSEMBLER_NAME (decl, id);
+ return id;
}
/* Generate the mangled representation of TYPE. */