[llvm] r362344 - llvm-undname; Add more test coverage for demangleFunctionClass()
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 2 16:26:57 PDT 2019
Author: nico
Date: Sun Jun 2 16:26:57 2019
New Revision: 362344
URL: http://llvm.org/viewvc/llvm-project?rev=362344&view=rev
Log:
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.)
Modified:
llvm/trunk/lib/Demangle/MicrosoftDemangle.cpp
llvm/trunk/test/Demangle/ms-mangle.test
Modified: llvm/trunk/lib/Demangle/MicrosoftDemangle.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Demangle/MicrosoftDemangle.cpp?rev=362344&r1=362343&r2=362344&view=diff
==============================================================================
--- llvm/trunk/lib/Demangle/MicrosoftDemangle.cpp (original)
+++ llvm/trunk/lib/Demangle/MicrosoftDemangle.cpp Sun Jun 2 16:26:57 2019
@@ -1587,11 +1587,11 @@ FuncClass Demangler::demangleFunctionCla
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':
Modified: llvm/trunk/test/Demangle/ms-mangle.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Demangle/ms-mangle.test?rev=362344&r1=362343&r2=362344&view=diff
==============================================================================
--- llvm/trunk/test/Demangle/ms-mangle.test (original)
+++ llvm/trunk/test/Demangle/ms-mangle.test Sun Jun 2 16:26:57 2019
@@ -401,3 +401,31 @@
??$emplace_back at ABH@?$vector at HV?$allocator at H@std@@@std@@QAE?A?<decltype-auto>@@ABH at Z
; CHECK: <decltype-auto> __thiscall std::vector<int, class std::allocator<int>>::emplace_back<int const &>(int const &)
+
+
+?pub_foo at S@@QAEXXZ
+; CHECK: public: void __thiscall S::pub_foo(void)
+
+?pub_stat_foo at S@@SAXXZ
+; CHECK: public: static void __cdecl S::pub_stat_foo(void)
+
+?pub_virt_foo at S@@UAEXXZ
+; CHECK: public: virtual void __thiscall S::pub_virt_foo(void)
+
+?prot_foo at S@@IAEXXZ
+; CHECK: protected: void __thiscall S::prot_foo(void)
+
+?prot_stat_foo at S@@KAXXZ
+; CHECK: protected: static void __cdecl S::prot_stat_foo(void)
+
+?prot_virt_foo at S@@MAEXXZ
+; CHECK: protected: virtual void __thiscall S::prot_virt_foo(void)
+
+?priv_foo at S@@AAEXXZ
+; CHECK: private: void __thiscall S::priv_foo(void)
+
+?priv_stat_foo at S@@CAXXZ
+; CHECK: private: static void __cdecl S::priv_stat_foo(void)
+
+?priv_virt_foo at S@@EAEXXZ
+; CHECK: private: virtual void __thiscall S::priv_virt_foo(void)
More information about the llvm-commits
mailing list