d-demangle.c (dlang_call_convention): Handle extern Objective-C function calling convention.

libiberty/ChangeLog:

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.

From-SVN: r232864
This commit is contained in:
Iain Buclaw 2016-01-27 01:07:26 +00:00 committed by Iain Buclaw
parent acf1f7da96
commit 13617162e3
3 changed files with 22 additions and 2 deletions

View File

@ -1,3 +1,11 @@
2016-01-27 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.
2016-01-27 Iain Buclaw <ibuclaw@gdcproject.org>
* d-demangle.c (dlang_function_args): Append ',' for variadic functions

View File

@ -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:

View File

@ -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)
#