demangler: Handle <=> operator in the demangler [PR94797]
authorJakub Jelinek <jakub@redhat.com>
Mon, 27 Apr 2020 18:59:25 +0000 (20:59 +0200)
committerJakub Jelinek <jakub@redhat.com>
Mon, 27 Apr 2020 18:59:25 +0000 (20:59 +0200)
The demangler didn't handle spaceship operator.

2020-04-27  Jakub Jelinek  <jakub@redhat.com>

PR demangler/94797
* cp-demangle.c (cplus_demangle_operators): Add ss <=> operator.
* testsuite/demangle-expected: Add operator<=> test.

libiberty/ChangeLog
libiberty/cp-demangle.c
libiberty/testsuite/demangle-expected

index 0c26d455caf3069d69fd9baf68696c530a735ab6..3b61aaca93c466bfc544a67633030d64889764aa 100644 (file)
@@ -1,3 +1,9 @@
+2020-04-27  Jakub Jelinek  <jakub@redhat.com>
+
+       PR demangler/94797
+       * cp-demangle.c (cplus_demangle_operators): Add ss <=> operator.
+       * testsuite/demangle-expected: Add operator<=> test.
+
 2020-04-25  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR bootstrap/94739
index fc55b7fae1fb3edbc11ed9d32f181d39284b2b57..cbfb2f937ca970bb57bf7983a466ac7fcf1cb478 100644 (file)
@@ -1860,6 +1860,7 @@ const struct demangle_operator_info cplus_demangle_operators[] =
   { "sP", NL ("sizeof..."), 1 },
   { "sZ", NL ("sizeof..."), 1 },
   { "sc", NL ("static_cast"), 2 },
+  { "ss", NL ("<=>"),       2 },
   { "st", NL ("sizeof "),   1 },
   { "sz", NL ("sizeof "),   1 },
   { "tr", NL ("throw"),     0 },
index ccadf84e608212096540f7a407aeb75c65f2f9d1..d8e50951f844fc8da64ef597e6dd1e20b7809984 100644 (file)
@@ -1453,3 +1453,6 @@ void foo<(void*)0>(enable_if<((void*)0)==(decltype(nullptr)), void>::type*)
 
 _ZNK5coro15emptyawEv
 coro1::empty::operator co_await() const
+
+_ZNK3FoossERKS_
+Foo::operator<=>(Foo const&) const