aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/mangle.c
diff options
context:
space:
mode:
authorAlex Samuel <samuel@gcc.gnu.org>2000-06-30 15:25:33 +0000
committerAlex Samuel <samuel@gcc.gnu.org>2000-06-30 15:25:33 +0000
commitbece74bdee6aa7a90fc573f11b27a43231bca007 (patch)
tree67c66f46e7f0fe9c54e0629a21c96199e0fae8f7 /gcc/cp/mangle.c
parentaf80d489916e279bdb3f75ca458b1d323205120f (diff)
downloadgcc-bece74bdee6aa7a90fc573f11b27a43231bca007.zip
gcc-bece74bdee6aa7a90fc573f11b27a43231bca007.tar.gz
gcc-bece74bdee6aa7a90fc573f11b27a43231bca007.tar.bz2
in libiberty/ChangeLog:
* cp-demangle.c (demangle_encoding): Accept no substitutions. (demangle_name): Handle <substitution> followed by <unqualified-template-name>. (demangle_type): Follow special substitutions with <class-enum-type> (demangle_subtitution): Set template_p for special substitutions. (main): Fix typos. in gcc/cp/ChangeLog: * mangle.c (find_substitution): Use same_type_p. (write_encoding): Don't check for substitutions. in libio/ChangeLog: * libioP.h (VTABLE_LABEL): Update for new vtable mangling. * stdstrbufs.cc (filebuf_vtable): Likewise. (stdiobuf_vtable): Likewise. From-SVN: r34811
Diffstat (limited to 'gcc/cp/mangle.c')
-rw-r--r--gcc/cp/mangle.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c
index a1d1d55..594e25c 100644
--- a/gcc/cp/mangle.c
+++ b/gcc/cp/mangle.c
@@ -463,7 +463,7 @@ find_substitution (node)
{
tree args = CLASSTYPE_TI_ARGS (type);
if (TREE_VEC_LENGTH (args) == 3
- && TREE_VEC_ELT (args, 0) == char_type_node
+ && same_type_p (TREE_VEC_ELT (args, 0), char_type_node)
&& is_std_substitution_char (TREE_VEC_ELT (args, 1),
SUBID_CHAR_TRAITS)
&& is_std_substitution_char (TREE_VEC_ELT (args, 2),
@@ -493,7 +493,7 @@ find_substitution (node)
args <char, std::char_traits<char> > . */
tree args = CLASSTYPE_TI_ARGS (type);
if (TREE_VEC_LENGTH (args) == 2
- && TREE_VEC_ELT (args, 0) == char_type_node
+ && same_type_p (TREE_VEC_ELT (args, 0), char_type_node)
&& is_std_substitution_char (TREE_VEC_ELT (args, 1),
SUBID_CHAR_TRAITS))
{
@@ -570,8 +570,7 @@ write_mangled_name (decl)
}
/* <encoding> ::= <function name> <bare-function-type>
- ::= <data name>
- ::= <substitution> */
+ ::= <data name> */
static void
write_encoding (decl)
@@ -579,9 +578,6 @@ write_encoding (decl)
{
MANGLE_TRACE_TREE ("encoding", decl);
- if (find_substitution (decl))
- return;
-
if (DECL_LANG_SPECIFIC (decl) && DECL_EXTERN_C_FUNCTION_P (decl))
{
write_source_name (DECL_NAME (decl));
@@ -600,8 +596,6 @@ write_encoding (decl)
write_bare_function_type (fn_type, DECL_TEMPLATE_ID_P (decl));
}
-
- add_substitution (decl);
}
/* <name> ::= <unscoped-name>