diff options
author | DJ Delorie <dj@redhat.com> | 2006-08-28 00:56:25 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2006-08-28 00:56:25 +0000 |
commit | cb6c09ace53de4a2952de95ff0f1f91e4809fbaa (patch) | |
tree | f1bcc51e7ead9bc22f4332bf59ddac7302656d6b /libiberty/cp-demangle.c | |
parent | 289397ccec5e89b311f173c9ea5df19cfb323587 (diff) | |
download | gdb-cb6c09ace53de4a2952de95ff0f1f91e4809fbaa.zip gdb-cb6c09ace53de4a2952de95ff0f1f91e4809fbaa.tar.gz gdb-cb6c09ace53de4a2952de95ff0f1f91e4809fbaa.tar.bz2 |
merge from gcc
Diffstat (limited to 'libiberty/cp-demangle.c')
-rw-r--r-- | libiberty/cp-demangle.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index 109d533..c7ee878 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -2081,13 +2081,22 @@ d_pointer_to_member_type (struct d_info *di) g++ does not work that way. g++ treats only the CV-qualified member function as a substitution source. FIXME. So to work with g++, we need to pull off the CV-qualifiers here, in order to - avoid calling add_substitution() in cplus_demangle_type(). */ + avoid calling add_substitution() in cplus_demangle_type(). But + for a CV-qualified member which is not a function, g++ does + follow the ABI, so we need to handle that case here by calling + d_add_substitution ourselves. */ pmem = d_cv_qualifiers (di, &mem, 1); if (pmem == NULL) return NULL; *pmem = cplus_demangle_type (di); + if (pmem != &mem && (*pmem)->type != DEMANGLE_COMPONENT_FUNCTION_TYPE) + { + if (! d_add_substitution (di, mem)) + return NULL; + } + return d_make_comp (di, DEMANGLE_COMPONENT_PTRMEM_TYPE, cl, mem); } |