diff options
author | DJ Delorie <dj@redhat.com> | 2010-05-06 21:40:04 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2010-05-06 21:40:04 +0000 |
commit | cf383746fa2c9023feaaf737b2c571e96a55aef5 (patch) | |
tree | f426d7a419882e87c0d20ca2cea17eda0d19c32b /libiberty | |
parent | 7f502d6c5a69837ad293d942ffa18fc16b8d0e3a (diff) | |
download | gdb-cf383746fa2c9023feaaf737b2c571e96a55aef5.zip gdb-cf383746fa2c9023feaaf737b2c571e96a55aef5.tar.gz gdb-cf383746fa2c9023feaaf737b2c571e96a55aef5.tar.bz2 |
merge from gcc
Diffstat (limited to 'libiberty')
-rw-r--r-- | libiberty/ChangeLog | 7 | ||||
-rw-r--r-- | libiberty/cp-demangle.c | 8 | ||||
-rw-r--r-- | libiberty/cp-demangle.h | 2 | ||||
-rw-r--r-- | libiberty/testsuite/demangle-expected | 3 |
4 files changed, 19 insertions, 1 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index cf4cdc4..4414e04 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,10 @@ +2010-05-06 Magnus Fromreide <magfr@lysator.liu.se> + Jason Merrill <jason@redhat.com> + + * cp-demangle.c (cplus_demangle_builtin_types): Add nullptr. + (cplus_demangle_type): Handle nullptr. + * testsuite/demangle-expected: Test it. + 2010-04-23 Pedro Alves <pedro@codesourcery.com> * lbasename.c (lbasename): Split into ... diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index 98c64db5..6db1f78 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -1987,6 +1987,8 @@ cplus_demangle_builtin_types[D_BUILTIN_TYPE_COUNT] = /* 29 */ { NL ("half"), NL ("half"), D_PRINT_FLOAT }, /* 30 */ { NL ("char16_t"), NL ("char16_t"), D_PRINT_DEFAULT }, /* 31 */ { NL ("char32_t"), NL ("char32_t"), D_PRINT_DEFAULT }, + /* 32 */ { NL ("decltype(nullptr)"), NL ("decltype(nullptr)"), + D_PRINT_DEFAULT }, }; CP_STATIC_IF_GLIBCPP_V3 @@ -2221,6 +2223,12 @@ cplus_demangle_type (struct d_info *di) ret = d_vector_type (di); break; + case 'n': + /* decltype(nullptr) */ + ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[32]); + di->expansion += ret->u.s_builtin.type->len; + break; + default: return NULL; } diff --git a/libiberty/cp-demangle.h b/libiberty/cp-demangle.h index aad3743..eac054e 100644 --- a/libiberty/cp-demangle.h +++ b/libiberty/cp-demangle.h @@ -147,7 +147,7 @@ struct d_info extern const struct demangle_operator_info cplus_demangle_operators[]; #endif -#define D_BUILTIN_TYPE_COUNT (32) +#define D_BUILTIN_TYPE_COUNT (33) CP_STATIC_IF_GLIBCPP_V3 const struct demangle_builtin_type_info diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected index 672f352..a3331c4 100644 --- a/libiberty/testsuite/demangle-expected +++ b/libiberty/testsuite/demangle-expected @@ -3938,6 +3938,9 @@ decltype ((operator+)({parm#1}, {parm#1})) f<A>(A) --format=gnu-v3 _Z1hI1AEDTcldtfp_miEET_ decltype (({parm#1}.(operator-))()) h<A>(A) +--format=gnu-v3 +_Z1fDn +f(decltype(nullptr)) # # Ada (GNAT) tests. # |