libiberty: Handle @live attribute in D demangler.
authorIain Buclaw <ibuclaw@gdcproject.org>
Fri, 15 May 2020 07:34:36 +0000 (09:34 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Fri, 15 May 2020 08:40:47 +0000 (10:40 +0200)
Adds support for demangling D functions annotated with the new
ownership/borrowing system attribute.

libiberty/ChangeLog:

* d-demangle.c (dlang_attributes): Add @live attribute.
* testsuite/d-demangle-expected: Add new tests.

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

index 74c515b4b90f6626a33b74cb83e70a988d54f21b..45dcc6d614f41873a3c4aa6f70b86a489e0a7b91 100644 (file)
@@ -1,3 +1,8 @@
+2020-05-15  Iain Buclaw  <ibuclaw@gdcproject.org>
+
+       * d-demangle.c (dlang_attributes): Add @live attribute.
+       * testsuite/d-demangle-expected: Add new tests.
+
 2020-05-14  Rainer Schuetze  <r.sagitario@gmx.de>
            Iain Buclaw  <ibuclaw@gdcproject.org>
 
index 5856bc2930f2dc583144833b8ca43c82d6f650d2..f2d6946ecad69947d237c064dc836e28cfe9a876 100644 (file)
@@ -578,6 +578,10 @@ dlang_attributes (string *decl, const char *mangled)
          mangled++;
          string_append (decl, "scope ");
          continue;
+       case 'm': /* @live */
+         mangled++;
+         string_append (decl, "@live ");
+         continue;
 
        default: /* unknown attribute */
          return NULL;
index 47b24ea48ae72b5f49bb583f2e6dfbe30eff63b8..e3f32e31d7bd96d3e3ef2653c7b5960016831c27 100644 (file)
@@ -462,6 +462,10 @@ _D8demangle4testFDFNiZaZv
 demangle.test(char() @nogc delegate)
 #
 --format=dlang
+_D8demangle4testFDFNmZaZv
+demangle.test(char() @live delegate)
+#
+--format=dlang
 _D8demangle4testFDFNaNbZaZv
 demangle.test(char() pure nothrow delegate)
 #
@@ -538,6 +542,10 @@ _D8demangle4testFPFNiZaZv
 demangle.test(char() @nogc function)
 #
 --format=dlang
+_D8demangle4testFPFNmZaZv
+demangle.test(char() @live function)
+#
+--format=dlang
 _D8demangle4testFPFNaNbZaZv
 demangle.test(char() pure nothrow function)
 #