Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// 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 |