diff options
author | Martin Liska <mliska@suse.cz> | 2022-10-15 15:32:39 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2022-10-15 15:32:39 +0200 |
commit | 2c92cfe87d2bb8aa0eb78f3932fca16699cb35c9 (patch) | |
tree | b118381a0a883a762ddd56c0e91608d937ee8bdf /libiberty | |
parent | bd21c04269deded2c7476ceca1100a26f28ea526 (diff) | |
parent | baeec7cc83b19b46d1c73523f06efa7ea2b30390 (diff) | |
download | gcc-2c92cfe87d2bb8aa0eb78f3932fca16699cb35c9.zip gcc-2c92cfe87d2bb8aa0eb78f3932fca16699cb35c9.tar.gz gcc-2c92cfe87d2bb8aa0eb78f3932fca16699cb35c9.tar.bz2 |
Merge branch 'master' into devel/sphinx
Diffstat (limited to 'libiberty')
-rw-r--r-- | libiberty/ChangeLog | 8 | ||||
-rw-r--r-- | libiberty/cp-demangle.c | 14 | ||||
-rw-r--r-- | libiberty/cp-demangle.h | 2 | ||||
-rw-r--r-- | libiberty/testsuite/demangle-expected | 4 |
4 files changed, 26 insertions, 2 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index b181a69..1c8cc5c 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,11 @@ +2022-10-14 Jakub Jelinek <jakub@redhat.com> + + * cp-demangle.h (D_BUILTIN_TYPE_COUNT): Increment. + * cp-demangle.c (cplus_demangle_builtin_types): Add std::bfloat16_t + entry. + (cplus_demangle_type): Demangle DF16b. + * testsuite/demangle-expected (_Z3xxxDF16b): New test. + 2022-10-11 Nathan Sidwell <nathan@acm.org> * cp-demangle.c (d_prefix): 'M' components are not diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index 4beb4d2..8413dcd 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -2487,6 +2487,7 @@ cplus_demangle_builtin_types[D_BUILTIN_TYPE_COUNT] = /* 33 */ { NL ("decltype(nullptr)"), NL ("decltype(nullptr)"), D_PRINT_DEFAULT }, /* 34 */ { NL ("_Float"), NL ("_Float"), D_PRINT_FLOAT }, + /* 35 */ { NL ("std::bfloat16_t"), NL ("std::bfloat16_t"), D_PRINT_FLOAT }, }; CP_STATIC_IF_GLIBCPP_V3 @@ -2751,11 +2752,22 @@ cplus_demangle_type (struct d_info *di) case 'F': /* DF<number>_ - _Float<number>. - DF<number>x - _Float<number>x. */ + DF<number>x - _Float<number>x + DF16b - std::bfloat16_t. */ { int arg = d_number (di); char buf[12]; char suffix = 0; + if (d_peek_char (di) == 'b') + { + if (arg != 16) + return NULL; + d_advance (di, 1); + ret = d_make_builtin_type (di, + &cplus_demangle_builtin_types[35]); + di->expansion += ret->u.s_builtin.type->len; + break; + } if (d_peek_char (di) == 'x') suffix = 'x'; if (!suffix && d_peek_char (di) != '_') diff --git a/libiberty/cp-demangle.h b/libiberty/cp-demangle.h index c5d046b..7f710be 100644 --- a/libiberty/cp-demangle.h +++ b/libiberty/cp-demangle.h @@ -180,7 +180,7 @@ d_advance (struct d_info *di, int i) extern const struct demangle_operator_info cplus_demangle_operators[]; #endif -#define D_BUILTIN_TYPE_COUNT (35) +#define D_BUILTIN_TYPE_COUNT (36) CP_STATIC_IF_GLIBCPP_V3 const struct demangle_builtin_type_info diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected index bd92b12..ee8fdfd 100644 --- a/libiberty/testsuite/demangle-expected +++ b/libiberty/testsuite/demangle-expected @@ -1249,6 +1249,10 @@ xxx _Z3xxxDF32xDF64xDF128xCDF32xVb xxx(_Float32x, _Float64x, _Float128x, _Float32x _Complex, bool volatile) xxx +--format=auto --no-params +_Z3xxxDF16b +xxx(std::bfloat16_t) +xxx # https://sourceware.org/bugzilla/show_bug.cgi?id=16817 --format=auto --no-params _QueueNotification_QueueController__$4PPPPPPPM_A_INotice___Z |