diff options
author | Mark Mitchell <mark@markmitchell.com> | 1998-11-08 13:20:53 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 1998-11-08 13:20:53 +0000 |
commit | ec2288ffe0fe34e2940f59ed38ec1a5d53d09764 (patch) | |
tree | d92d3afd303f4e6c26c7476f92ba193a172c9bbd /libiberty | |
parent | 0e714131c8bc3f42f9c552c259562f814066ec2e (diff) | |
download | gcc-ec2288ffe0fe34e2940f59ed38ec1a5d53d09764.zip gcc-ec2288ffe0fe34e2940f59ed38ec1a5d53d09764.tar.gz gcc-ec2288ffe0fe34e2940f59ed38ec1a5d53d09764.tar.bz2 |
cplus-dem.c (type_kind_t): Add tk_reference.
* cplus-dem.c (type_kind_t): Add tk_reference.
(demangle_template_value_parm): Handle it.
(do_type): Use it for references, instead of tk_pointer.
From-SVN: r23572
Diffstat (limited to 'libiberty')
-rw-r--r-- | libiberty/ChangeLog | 4 | ||||
-rw-r--r-- | libiberty/cplus-dem.c | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 6f9e088..0e339dc 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,5 +1,9 @@ 1998-11-08 Mark Mitchell <mark@markmitchell.com> + * cplus-dem.c (type_kind_t): Add tk_reference. + (demangle_template_value_parm): Handle it. + (do_type): Use it for references, instead of tk_pointer. + * cplus-dem.c (demangle_template_value_parm): Use cplus_demangle, not internal_cplus_demangle. diff --git a/libiberty/cplus-dem.c b/libiberty/cplus-dem.c index ebd00e1..9b3c5ad 100644 --- a/libiberty/cplus-dem.c +++ b/libiberty/cplus-dem.c @@ -234,6 +234,7 @@ typedef enum type_kind_t { tk_none, tk_pointer, + tk_reference, tk_integral, tk_bool, tk_char, @@ -1424,7 +1425,7 @@ demangle_template_value_parm (work, mangled, s, tk) } } } - else if (tk == tk_pointer) + else if (tk == tk_pointer || tk == tk_reference) { int symbol_len = consume_count (mangled); if (symbol_len == 0) @@ -1442,7 +1443,8 @@ demangle_template_value_parm (work, mangled, s, tk) or type-code information we have built up thus far; it is mangled independently. */ q = cplus_demangle (p, work->options); - string_appendn (s, "&", 1); + if (tk == tk_pointer) + string_appendn (s, "&", 1); /* FIXME: Pointer-to-member constants should get a qualifying class name here. */ if (q) @@ -2611,7 +2613,7 @@ do_type (work, mangled, result) (*mangled)++; string_prepend (&decl, "&"); if (tk == tk_none) - tk = tk_pointer; + tk = tk_reference; break; /* An array */ |