public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 3/3] [D] libiberty: Handle the new extern(Objective-C) calling convention
@ 2016-01-27  0:41 Iain Buclaw
  2016-01-27  0:47 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: Iain Buclaw @ 2016-01-27  0:41 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 64 bytes --]

Finally, recognizing the extern(Objective-C) symbol 'Y'.

Iain.

[-- Attachment #2: dlang-objc.patch --]
[-- Type: text/x-patch, Size: 2018 bytes --]

---
libiberty/

 2016-01-26  Iain Buclaw  <ibuclaw@gdcproject.org>
 
	* d-demangle.c (dlang_call_convention): Handle extern Objective-C
	function calling convention.
	(dlang_call_convention_p): Likewise.
	(dlang_type): Likewise.
	* testsuite/d-demangle-expected: Add coverage tests.

diff --git a/libiberty/d-demangle.c b/libiberty/d-demangle.c
index 9e5a8043..4ad90a6 100644
--- a/libiberty/d-demangle.c
+++ b/libiberty/d-demangle.c
@@ -223,6 +223,10 @@ dlang_call_convention (string *decl, const char *mangled)
       mangled++;
       string_append (decl, "extern(C++) ");
       break;
+    case 'Y': /* (Objective-C) */
+      mangled++;
+      string_append (decl, "extern(Objective-C) ");
+      break;
     default:
       return NULL;
     }
@@ -539,7 +543,7 @@ dlang_type (string *decl, const char *mangled)
       switch (*mangled)
 	{
 	case 'F': case 'U': case 'W':
-	case 'V': case 'R':
+	case 'V': case 'R': case 'Y':
 	  mangled = dlang_function_type (decl, mangled);
 	  string_append (decl, "function");
 	  return mangled;
@@ -1338,7 +1342,7 @@ dlang_call_convention_p (const char *mangled)
   switch (*mangled)
     {
     case 'F': case 'U': case 'V':
-    case 'W': case 'R':
+    case 'W': case 'R': case 'Y':
       return 1;
 
     default:
diff --git a/libiberty/testsuite/d-demangle-expected b/libiberty/testsuite/d-demangle-expected
index 8f0b167..04d39f4 100644
--- a/libiberty/testsuite/d-demangle-expected
+++ b/libiberty/testsuite/d-demangle-expected
@@ -394,6 +394,10 @@ _D8demangle4testFDRZaZv
 demangle.test(extern(C++) char() delegate)
 #
 --format=dlang
+_D8demangle4testFDYZaZv
+demangle.test(extern(Objective-C) char() delegate)
+#
+--format=dlang
 _D8demangle4testFPFZaZv
 demangle.test(char() function)
 #
@@ -414,6 +418,10 @@ _D8demangle4testFPRZaZv
 demangle.test(extern(C++) char() function)
 #
 --format=dlang
+_D8demangle4testFPYZaZv
+demangle.test(extern(Objective-C) char() function)
+#
+--format=dlang
 _D8demangle4testFDFNaZaZv
 demangle.test(char() pure delegate)
 #

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 3/3] [D] libiberty: Handle the new extern(Objective-C) calling convention
  2016-01-27  0:41 [PATCH 3/3] [D] libiberty: Handle the new extern(Objective-C) calling convention Iain Buclaw
@ 2016-01-27  0:47 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2016-01-27  0:47 UTC (permalink / raw)
  To: Iain Buclaw; +Cc: gcc-patches

On Tue, Jan 26, 2016 at 4:41 PM, Iain Buclaw <ibuclaw@gdcproject.org> wrote:
> Finally, recognizing the extern(Objective-C) symbol 'Y'.

This is OK.

Thanks.

Ian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-27  0:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-27  0:41 [PATCH 3/3] [D] libiberty: Handle the new extern(Objective-C) calling convention Iain Buclaw
2016-01-27  0:47 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).