diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-11-08 13:20:53 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-11-08 13:20:53 +0000 |
commit | 73bea9623dde87c198da52f8d7fefa7d4c8fbe17 (patch) | |
tree | d92d3afd303f4e6c26c7476f92ba193a172c9bbd /libiberty | |
parent | 5b546829b4d1e491a9321054ad46bc1b46e02ca3 (diff) | |
download | gcc-73bea9623dde87c198da52f8d7fefa7d4c8fbe17.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23572 138bc75d-0d04-0410-961f-82ee72b054a4
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 6f9e08872e2..0e339dcb362 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 ebd00e19508..9b3c5ad71b1 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 */ |