diff options
| author | Zachary Turner <zturner@google.com> | 2018-07-26 20:20:10 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2018-07-26 20:20:10 +0000 |
| commit | 38b78a7f0e8485140d2c97dff4f82b5c9c7ad0a9 (patch) | |
| tree | 4abc488be0af7a404467234008058725820af25a /llvm/test | |
| parent | 6c8cbf6db0839e525db4969377fa8109b6a6fcc9 (diff) | |
| download | bcm5719-llvm-38b78a7f0e8485140d2c97dff4f82b5c9c7ad0a9.tar.gz bcm5719-llvm-38b78a7f0e8485140d2c97dff4f82b5c9c7ad0a9.zip | |
[MS Demangler] Demangle pointers to member functions.
After this patch, we can now properly demangle pointers to member
functions. The calling convention is located in the wrong place,
but this will be fixed in a followup since it also affects non
member function pointers.
Differential Revision: https://reviews.llvm.org/D49639
llvm-svn: 338065
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/Demangle/ms-basic.test | 10 | ||||
| -rw-r--r-- | llvm/test/Demangle/ms-mangle.test | 89 |
2 files changed, 50 insertions, 49 deletions
diff --git a/llvm/test/Demangle/ms-basic.test b/llvm/test/Demangle/ms-basic.test index 17694b90284..2811017a88e 100644 --- a/llvm/test/Demangle/ms-basic.test +++ b/llvm/test/Demangle/ms-basic.test @@ -106,7 +106,7 @@ ??4klass@@QEAAAEBV0@AEBV0@@Z -; CHECK: class klass const &__cdecl klass::operator=(class klass const &) +; CHECK: class klass const & __cdecl klass::operator=(class klass const &) ??7klass@@QEAA_NXZ ; CHECK: bool __cdecl klass::operator!(void) @@ -211,16 +211,16 @@ ; CHECK: int __cdecl klass::operator^=(int) ??6@YAAEBVklass@@AEBV0@H@Z -; CHECK: class klass const &__cdecl operator<<(class klass const &, int) +; CHECK: class klass const & __cdecl operator<<(class klass const &, int) ??5@YAAEBVklass@@AEBV0@_K@Z -; CHECK: class klass const &__cdecl operator>>(class klass const &, unsigned __int64) +; CHECK: class klass const & __cdecl operator>>(class klass const &, unsigned __int64) ??2@YAPEAX_KAEAVklass@@@Z -; CHECK: void *__cdecl operator new(unsigned __int64, class klass &) +; CHECK: void * __cdecl operator new(unsigned __int64, class klass &) ??_U@YAPEAX_KAEAVklass@@@Z -; CHECK: void *__cdecl operator new[](unsigned __int64, class klass &) +; CHECK: void * __cdecl operator new[](unsigned __int64, class klass &) ??3@YAXPEAXAEAVklass@@@Z ; CHECK: void __cdecl operator delete(void *, class klass &) diff --git a/llvm/test/Demangle/ms-mangle.test b/llvm/test/Demangle/ms-mangle.test index 2266ef8d400..d6ec36c0247 100644 --- a/llvm/test/Demangle/ms-mangle.test +++ b/llvm/test/Demangle/ms-mangle.test @@ -61,10 +61,10 @@ ; CHECK: int __cdecl foo::operator+(int) ?static_method@foo@@SAPAV1@XZ -; CHECK: static class foo *__cdecl foo::static_method(void) +; CHECK: static class foo * __cdecl foo::static_method(void) ?static_method@foo@@SAPEAV1@XZ -; CHECK: static class foo *__cdecl foo::static_method(void) +; CHECK: static class foo * __cdecl foo::static_method(void) ?g@bar@@2HA ; CHECK: static int bar::g @@ -92,15 +92,17 @@ ?j@@3P6GHCE@ZA ; CHECK: int __stdcall (*j)(signed char, unsigned char) +?funptr@@YAP6AHXZXZ +; CHECK: int __cdecl (* __cdecl funptr(void))(void) + ?k@@3PTfoo@@DT1@ ; CHECK: char const volatile foo::*k ?k@@3PETfoo@@DET1@ ; CHECK: char const volatile foo::*k -; FIXME: We don't support member function pointers yet. -; ?l@@3P8foo@@AEHH@ZQ1@ -; FIXME: int __thiscall (foo::*l)(int) +?l@@3P8foo@@AEHH@ZQ1@ +; CHECK: int __thiscall (foo::*l)(int) ?g_cInt@@3HB ; CHECK: int const g_cInt @@ -148,13 +150,13 @@ ; CHECK: void __cdecl zeta(int __cdecl (*)(int, int)) ??2@YAPAXI@Z -; CHECK: void *__cdecl operator new(unsigned int) +; CHECK: void * __cdecl operator new(unsigned int) ??3@YAXPAX@Z ; CHECK: void __cdecl operator delete(void *) ??_U@YAPAXI@Z -; CHECK: void *__cdecl operator new[](unsigned int) +; CHECK: void * __cdecl operator new[](unsigned int) ??_V@YAXPAX@Z ; CHECK: void __cdecl operator delete[](void *) @@ -172,51 +174,50 @@ ; ?color4@@3QAY02$$CBNA ; FIXME-EXTRACONST: double const (*color4)[3] -; FIXME-MEMBERPTR: We don't support member pointers yet. -; ?memptr1@@3RESB@@HES1 -; FIXME-MEMBERPTR: volatile int B::*memptr2 +?memptr1@@3RESB@@HES1@ +; CHECK: int volatile B::*volatile memptr1 -; ?memptr2@@3PESB@@HES1 -; FIXME: volatile int B::*memptr2 +?memptr2@@3PESB@@HES1@ +; CHECK: int volatile B::*memptr2 -; ?memptr3@@3REQB@@HEQ1 -; FIXME-MEMBERPTR: int B::* volatile memptr3 +?memptr3@@3REQB@@HEQ1@ +; CHECK: int B::*volatile memptr3 -; ?funmemptr1@@3RESB@@R6AHXZES1 -; FIXME-MEMBERPTR: int __cdecl (* volatile B::* volatile funmemptr1)(void) +?funmemptr1@@3RESB@@R6AHXZES1@ +; CHECK: int __cdecl (*volatile B::*volatile funmemptr1)(void) -; ?funmemptr2@@3PESB@@R6AHXZES1 -; FIXME-MEMBERPTR: int __cdecl (* volatile B::*funmemptr2)(void) +?funmemptr2@@3PESB@@R6AHXZES1@ +; CHECK: int __cdecl (*volatile B::*funmemptr2)(void) -; ?funmemptr3@@3REQB@@P6AHXZEQ1 -; FIXME-MEMBERPTR: int __cdecl (* B::*volatile funmemptr3)(void) +?funmemptr3@@3REQB@@P6AHXZEQ1@ +; CHECK: int __cdecl (*B::*volatile funmemptr3)(void) -; ?memptrtofun1@@3R8B@@EAAXXZEQ1 -; FIXME-MEMBERPTR: void __cdecl (B::*volatile memptrtofun1)(void) +?memptrtofun1@@3R8B@@EAAXXZEQ1@ +; CHECK: void __cdecl (B::*volatile memptrtofun1)(void) -; ?memptrtofun2@@3P8B@@EAAXXZEQ1 -; FIXME-MEMBERPTR: void __cdecl (B::*memptrtofun2)(void) +?memptrtofun2@@3P8B@@EAAXXZEQ1@ +; CHECK: void __cdecl (B::*memptrtofun2)(void) -; ?memptrtofun3@@3P8B@@EAAXXZEQ1 -; FIXME-MEMBERPTR: void __cdecl (B::*memptrtofun3)(void) +?memptrtofun3@@3P8B@@EAAXXZEQ1@ +; CHECK: void __cdecl (B::*memptrtofun3)(void) -; ?memptrtofun4@@3R8B@@EAAHXZEQ1 -; FIXME-MEMBERPTR: int __cdecl (B::* volatile memptrtofun4)(void) +?memptrtofun4@@3R8B@@EAAHXZEQ1@ +; CHECK: int __cdecl (B::*volatile memptrtofun4)(void) -; ?memptrtofun5@@3P8B@@EAA?CHXZEQ1 -; FIXME-MEMBERPTR: int volatile __cdecl (B::*memptrtofun5)(void) +?memptrtofun5@@3P8B@@EAA?CHXZEQ1@ +; CHECK: int volatile __cdecl (B::*memptrtofun5)(void) -; ?memptrtofun6@@3P8B@@EAA?BHXZEQ1 -; FIXME-MEMBERPTR: int const __cdecl (B::*memptrtofun6)(void) +?memptrtofun6@@3P8B@@EAA?BHXZEQ1@ +; CHECK: int const __cdecl (B::*memptrtofun6)(void) -; ?memptrtofun7@@3R8B@@EAAP6AHXZXZEQ1 -; FIXME-MEMBERPTR: int __cdecl (*(__cdecl B::*volatile memptrtofun7)(void))(void) +?memptrtofun7@@3R8B@@EAAP6AHXZXZEQ1@ +; CHECK: int __cdecl (* __cdecl (B::*volatile memptrtofun7)(void))(void) -; ?memptrtofun8@@3P8B@@EAAR6AHXZXZEQ1 -; FIXME-MEMBERPTR: int __cdecl (*(__cdecl B::*memptrtofun8)(void))(void) +?memptrtofun8@@3P8B@@EAAR6AHXZXZEQ1@ +; CHECK: int __cdecl (*volatile __cdecl (B::*memptrtofun8)(void))(void) -; ?memptrtofun9@@3P8B@@EAAQ6AHXZXZEQ1 -; FIXME-MEMBERPTR: int __cdecl(*(__cdecl B::*memptrtofun9)(void))(void) +?memptrtofun9@@3P8B@@EAAQ6AHXZXZEQ1@ +; CHECK: int __cdecl (*const __cdecl (B::*memptrtofun9)(void))(void) ?fooE@@YA?AW4E@@XZ @@ -261,11 +262,11 @@ ; FIXME-EXTERNC: int `extern_c_func'::`2'::local ??2OverloadedNewDelete@@SAPAXI@Z -; CHECK: static void *__cdecl OverloadedNewDelete::operator new(unsigned int) +; CHECK: static void * __cdecl OverloadedNewDelete::operator new(unsigned int) ??_UOverloadedNewDelete@@SAPAXI@Z -; CHECK: static void *__cdecl OverloadedNewDelete::operator new[](unsigned int) +; CHECK: static void * __cdecl OverloadedNewDelete::operator new[](unsigned int) ??3OverloadedNewDelete@@SAXPAX@Z ; CHECK: static void __cdecl OverloadedNewDelete::operator delete(void *) @@ -278,10 +279,10 @@ ; CHECK: int __thiscall OverloadedNewDelete::operator+(int) ??2OverloadedNewDelete@@SAPEAX_K@Z -; CHECK: static void *__cdecl OverloadedNewDelete::operator new(unsigned __int64) +; CHECK: static void * __cdecl OverloadedNewDelete::operator new(unsigned __int64) ??_UOverloadedNewDelete@@SAPEAX_K@Z -; CHECK: static void *__cdecl OverloadedNewDelete::operator new[](unsigned __int64) +; CHECK: static void * __cdecl OverloadedNewDelete::operator new[](unsigned __int64) ??3OverloadedNewDelete@@SAXPEAX@Z ; CHECK: static void __cdecl OverloadedNewDelete::operator delete(void *) @@ -295,11 +296,11 @@ ??2TypedefNewDelete@@SAPAXI@Z -; CHECK: static void *__cdecl TypedefNewDelete::operator new(unsigned int) +; CHECK: static void * __cdecl TypedefNewDelete::operator new(unsigned int) ??_UTypedefNewDelete@@SAPAXI@Z -; CHECK: static void *__cdecl TypedefNewDelete::operator new[](unsigned int) +; CHECK: static void * __cdecl TypedefNewDelete::operator new[](unsigned int) ??3TypedefNewDelete@@SAXPAX@Z ; CHECK: static void __cdecl TypedefNewDelete::operator delete(void *) |

