diff options
Diffstat (limited to 'libiberty')
-rw-r--r-- | libiberty/ChangeLog | 7 | ||||
-rw-r--r-- | libiberty/cp-demangle.c | 18 | ||||
-rw-r--r-- | libiberty/cp-demangle.h | 2 |
3 files changed, 20 insertions, 7 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 2206b91..bcc0227 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,10 @@ +2019-01-14 Tom Honermann <tom@honermann.net> + + * cp-demangle.c (cplus_demangle_builtin_types) + (cplus_demangle_type): Add name demangling for char8_t (Du). + * cp-demangle.h: Increase D_BUILTIN_TYPE_COUNT to accommodate the + new char8_t type. + 2019-01-09 Sandra Loosemore <sandra@codesourcery.com> PR other/16615 diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index ddcd3be..b34b485 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -2364,9 +2364,10 @@ cplus_demangle_builtin_types[D_BUILTIN_TYPE_COUNT] = /* 27 */ { NL ("decimal64"), NL ("decimal64"), D_PRINT_DEFAULT }, /* 28 */ { NL ("decimal128"), NL ("decimal128"), D_PRINT_DEFAULT }, /* 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)"), + /* 30 */ { NL ("char8_t"), NL ("char8_t"), D_PRINT_DEFAULT }, + /* 31 */ { NL ("char16_t"), NL ("char16_t"), D_PRINT_DEFAULT }, + /* 32 */ { NL ("char32_t"), NL ("char32_t"), D_PRINT_DEFAULT }, + /* 33 */ { NL ("decltype(nullptr)"), NL ("decltype(nullptr)"), D_PRINT_DEFAULT }, }; @@ -2654,14 +2655,19 @@ cplus_demangle_type (struct d_info *di) ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[29]); di->expansion += ret->u.s_builtin.type->len; break; + case 'u': + /* char8_t */ + ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[30]); + di->expansion += ret->u.s_builtin.type->len; + break; case 's': /* char16_t */ - ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[30]); + ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[31]); di->expansion += ret->u.s_builtin.type->len; break; case 'i': /* char32_t */ - ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[31]); + ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[32]); di->expansion += ret->u.s_builtin.type->len; break; @@ -2687,7 +2693,7 @@ cplus_demangle_type (struct d_info *di) case 'n': /* decltype(nullptr) */ - ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[32]); + ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[33]); di->expansion += ret->u.s_builtin.type->len; break; diff --git a/libiberty/cp-demangle.h b/libiberty/cp-demangle.h index b739bdf..92191cf 100644 --- a/libiberty/cp-demangle.h +++ b/libiberty/cp-demangle.h @@ -176,7 +176,7 @@ d_advance (struct d_info *di, int i) extern const struct demangle_operator_info cplus_demangle_operators[]; #endif -#define D_BUILTIN_TYPE_COUNT (33) +#define D_BUILTIN_TYPE_COUNT (34) CP_STATIC_IF_GLIBCPP_V3 const struct demangle_builtin_type_info |