diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2016-01-27 01:07:26 +0000 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gcc.gnu.org> | 2016-01-27 01:07:26 +0000 |
commit | 13617162e3e12c5bdc9a22fdc9e2a146fbb8be76 (patch) | |
tree | 13239d12f2690bf745ed033f6fc8c00486fece8f /libiberty | |
parent | acf1f7da9628b30a5577bf954f26e328a89c2ac7 (diff) | |
download | gcc-13617162e3e12c5bdc9a22fdc9e2a146fbb8be76.tar.gz |
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
Diffstat (limited to 'libiberty')
-rw-r--r-- | libiberty/ChangeLog | 8 | ||||
-rw-r--r-- | libiberty/d-demangle.c | 8 | ||||
-rw-r--r-- | libiberty/testsuite/d-demangle-expected | 8 |
3 files changed, 22 insertions, 2 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 88422c54815..d11f4cea099 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,5 +1,13 @@ 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 only if parameters were seen before the elipsis symbol. * testsuite/d-demangle-expected: Add coverage test for parameter-less diff --git a/libiberty/d-demangle.c b/libiberty/d-demangle.c index 9e5a80439f5..4ad90a6c58c 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 8f0b167142c..04d39f41015 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) # |