Commit 041c97f2 by Mark Mitchell Committed by Jason Merrill

cplus-dem.c (demangle_signature): Don't look for return types on constructors.

	* cplus-dem.c (demangle_signature): Don't look for return types on
	constructors.  Handle member template constructors.

From-SVN: r15903
parent 438998a9
Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
* cplus-dem.c (demangle_signature): Don't look for return types on
constructors. Handle member template constructors.
Tue Oct 14 11:30:29 1997 Jason Merrill <jason@yorick.cygnus.com> Tue Oct 14 11:30:29 1997 Jason Merrill <jason@yorick.cygnus.com>
* tree.c (expr_tree_cons, build_expr_list, expralloc): New fns. * tree.c (expr_tree_cons, build_expr_list, expralloc): New fns.
......
...@@ -831,7 +831,8 @@ demangle_signature (work, mangled, declp) ...@@ -831,7 +831,8 @@ demangle_signature (work, mangled, declp)
{ {
/* A G++ template function. Read the template arguments. */ /* A G++ template function. Read the template arguments. */
success = demangle_template (work, mangled, declp, 0, 0); success = demangle_template (work, mangled, declp, 0, 0);
expect_return_type = 1; if (!(work->constructor & 1))
expect_return_type = 1;
(*mangled)++; (*mangled)++;
break; break;
} }
...@@ -1534,7 +1535,8 @@ demangle_prefix (work, mangled, declp) ...@@ -1534,7 +1535,8 @@ demangle_prefix (work, mangled, declp)
} }
} }
else if ((scan == *mangled) else if ((scan == *mangled)
&& (isdigit (scan[2]) || (scan[2] == 'Q') || (scan[2] == 't'))) && (isdigit (scan[2]) || (scan[2] == 'Q') || (scan[2] == 't')
|| (scan[2] == 'H')))
{ {
/* The ARM says nothing about the mangling of local variables. /* The ARM says nothing about the mangling of local variables.
But cfront mangles local variables by prepending __<nesting_level> But cfront mangles local variables by prepending __<nesting_level>
...@@ -1551,7 +1553,8 @@ demangle_prefix (work, mangled, declp) ...@@ -1551,7 +1553,8 @@ demangle_prefix (work, mangled, declp)
{ {
/* A GNU style constructor starts with __[0-9Qt]. But cfront uses /* A GNU style constructor starts with __[0-9Qt]. But cfront uses
names like __Q2_3foo3bar for nested type names. So don't accept names like __Q2_3foo3bar for nested type names. So don't accept
this style of constructor for cfront demangling. */ this style of constructor for cfront demangling. A GNU
style member-template constructor starts with 'H'. */
if (!(LUCID_DEMANGLING || ARM_DEMANGLING)) if (!(LUCID_DEMANGLING || ARM_DEMANGLING))
work -> constructor += 1; work -> constructor += 1;
*mangled = scan + 2; *mangled = scan + 2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment