[MinGW] Automatically mangle Windows-specific entry points as C
authorMartin Storsjo <martin@martin.st>
Mon, 16 Jul 2018 05:42:25 +0000 (05:42 +0000)
committerMartin Storsjo <martin@martin.st>
Mon, 16 Jul 2018 05:42:25 +0000 (05:42 +0000)
commit92e26613c6af2c9ebc959de7d02c18be10cd941b
tree7705c1f693c516218821779fe92a361bf22c8ff6
parentbc46bca99e54f016c559286f53bdda66a484b96b
[MinGW] Automatically mangle Windows-specific entry points as C

This mangles entry points wmain, WinMain, wWinMain or DllMain as C
functions, to match the ABI for these functions.

We already did the same for these functions in MSVC mode, but we also
should do the same in the Itanium ABI.

This fixes PR38124.

Differential Revision: https://reviews.llvm.org/D49354

llvm-svn: 337146
clang/lib/AST/ItaniumMangle.cpp
clang/test/CodeGenCXX/mangle-mingw.cpp [new file with mode: 0644]