This patch is a second attempt at fixing a link error for MSVC entry points when calling conventions are specified using a flag.
Calling conventions specified using flags should not be applied to MSVC entry points. The default calling convention is set in this case. The default calling convention for MSVC entry points main and wmain is cdecl. For WinMain, wWinMain and DllMain, the default calling convention is stdcall on 32 bit Windows.
Explicitly specified calling conventions are applied to MSVC entry points.
For MinGW, the default calling convention for all MSVC entry points is __cdecl.
First attempt: 4cff1b40dacf6 (https://reviews.llvm.org/D87701)
Revert of first attempt: bebfc3b92d5e8
This should only be done on 32-bit x86 platforms. I think i686-window-msvc is the more special case platform here, so I would recommend making the helper something like isDefaultStdCall, which is true for i686-windows-msvc, false for mingw and non-x86 triples, and false for main/wmain.