[v2] libiberty: d-demangle: use distinguishable tuple()

Message ID 20211013160448.183605-1-contact@lsferreira.net
State New
Headers show
Series
  • [v2] libiberty: d-demangle: use distinguishable tuple()
Related show

Commit Message

Luís Ferreira Oct. 13, 2021, 4:04 p.m.
Since Tuple!() is templated type from standard library, this can make two
demangled names undistinguishable.

Signed-off-by: Luís Ferreira <contact@lsferreira.net>


libiberty/ChangeLog:

	* d-demangle.c (dlang_parse_tuple): use tuple() instead of Tuple!()
	* testsuite/d-demangle-expected: rename the tests to use tuple()
	  instead of Tuple!().
---
 libiberty/d-demangle.c                  |  2 +-
 libiberty/testsuite/d-demangle-expected | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

-- 
2.33.0

Patch

diff --git a/libiberty/d-demangle.c b/libiberty/d-demangle.c
index 880f2ec85a4..5dbdc36adbe 100644
--- a/libiberty/d-demangle.c
+++ b/libiberty/d-demangle.c
@@ -1711,7 +1711,7 @@  dlang_parse_tuple (string *decl, const char *mangled, struct dlang_info *info)
   if (mangled == NULL)
     return NULL;
 
-  string_append (decl, "Tuple!(");
+  string_append (decl, "tuple(");
 
   while (elements--)
     {
diff --git a/libiberty/testsuite/d-demangle-expected b/libiberty/testsuite/d-demangle-expected
index 44a3649c429..98044ad23c5 100644
--- a/libiberty/testsuite/d-demangle-expected
+++ b/libiberty/testsuite/d-demangle-expected
@@ -367,27 +367,27 @@  demangle.test(char, char)
 #
 --format=dlang
 _D8demangle4testFB0Zv
-demangle.test(Tuple!())
+demangle.test(tuple())
 #
 --format=dlang
 _D8demangle4testFB1aZv
-demangle.test(Tuple!(char))
+demangle.test(tuple(char))
 #
 --format=dlang
 _D8demangle4testFB2aaZv
-demangle.test(Tuple!(char, char))
+demangle.test(tuple(char, char))
 #
 --format=dlang
 _D8demangle4testFB3aaaZv
-demangle.test(Tuple!(char, char, char))
+demangle.test(tuple(char, char, char))
 #
 --format=dlang
 _D8demangle4testFB2OaaZv
-demangle.test(Tuple!(shared(char), char))
+demangle.test(tuple(shared(char), char))
 #
 --format=dlang
 _D8demangle4testFB3aDFZaaZv
-demangle.test(Tuple!(char, char() delegate, char))
+demangle.test(tuple(char, char() delegate, char))
 #
 --format=dlang
 _D8demangle4testFDFZaZv