llvm-undname; Add more test coverage for demangleFunctionClass()

Also add two FC_Far that seem to be missing, by symmetry from
the public and protected cases. (But FC_Far isn't really a thing
anymore, so this doesn't really have an observable effect.)

llvm-svn: 362344
This commit is contained in:
Nico Weber 2019-06-02 23:26:57 +00:00
parent 0ac4ab48fc
commit 54362477c7
2 changed files with 30 additions and 2 deletions

View File

@ -1587,11 +1587,11 @@ FuncClass Demangler::demangleFunctionClass(StringView &MangledName) {
case 'C':
return FuncClass(FC_Private | FC_Static);
case 'D':
return FuncClass(FC_Private | FC_Static);
return FuncClass(FC_Private | FC_Static | FC_Far);
case 'E':
return FuncClass(FC_Private | FC_Virtual);
case 'F':
return FuncClass(FC_Private | FC_Virtual);
return FuncClass(FC_Private | FC_Virtual | FC_Far);
case 'G':
return FuncClass(FC_Private | FC_StaticThisAdjust);
case 'H':

View File

@ -401,3 +401,31 @@
??$emplace_back@ABH@?$vector@HV?$allocator@H@std@@@std@@QAE?A?<decltype-auto>@@ABH@Z
; CHECK: <decltype-auto> __thiscall std::vector<int, class std::allocator<int>>::emplace_back<int const &>(int const &)
?pub_foo@S@@QAEXXZ
; CHECK: public: void __thiscall S::pub_foo(void)
?pub_stat_foo@S@@SAXXZ
; CHECK: public: static void __cdecl S::pub_stat_foo(void)
?pub_virt_foo@S@@UAEXXZ
; CHECK: public: virtual void __thiscall S::pub_virt_foo(void)
?prot_foo@S@@IAEXXZ
; CHECK: protected: void __thiscall S::prot_foo(void)
?prot_stat_foo@S@@KAXXZ
; CHECK: protected: static void __cdecl S::prot_stat_foo(void)
?prot_virt_foo@S@@MAEXXZ
; CHECK: protected: virtual void __thiscall S::prot_virt_foo(void)
?priv_foo@S@@AAEXXZ
; CHECK: private: void __thiscall S::priv_foo(void)
?priv_stat_foo@S@@CAXXZ
; CHECK: private: static void __cdecl S::priv_stat_foo(void)
?priv_virt_foo@S@@EAEXXZ
; CHECK: private: virtual void __thiscall S::priv_virt_foo(void)