llvm-project/clang/test/CodeGenCXX/mangle-mingw.cpp
Martin Storsjo 92e26613c6 [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
2018-07-16 05:42:25 +00:00

20 lines
382 B
C++

// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-w64-mingw32 | FileCheck %s
int func() { return 0; }
// CHECK-DAG: @_Z4funcv
int main() { return 0; }
// CHECK-DAG: @main
int wmain() { return 0; }
// CHECK-DAG: @wmain
int WinMain() { return 0; }
// CHECK-DAG: @WinMain
int wWinMain() { return 0; }
// CHECK-DAG: @wWinMain
int DllMain() { return 0; }
// CHECK-DAG: @DllMain