Virtual member pointers are implemented using a thunk. We assumed that
the calling convention for this thunk was always __thiscall for 32-bit
targets and __cdecl for 64-bit targets. However, this is not the case.
Mangle in whichever calling convention is appropriate for this member
function thunk.
llvm-svn: 232254
This avoids encoding information about the function prototype into the
thunk at the cost of some function prototype bitcast gymnastics.
Fixes PR20653.
llvm-svn: 216782