[all-commits] [llvm/llvm-project] d8b8f5: [Reland] "Do not apply calling conventions to MSVC...

elizabethandrews via All-commits all-commits at lists.llvm.org
Thu Mar 18 04:41:21 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d8b8f544d9de30cd14584094596090d3f9992345
      https://github.com/llvm/llvm-project/commit/d8b8f544d9de30cd14584094596090d3f9992345
  Author: Elizabeth Andrews <elizabeth.andrews at intel.com>
  Date:   2021-03-18 (Thu, 18 Mar 2021)

  Changed paths:
    M clang/lib/Sema/SemaDecl.cpp
    M clang/test/CodeGenCXX/default_calling_conv.cpp

  Log Message:
  -----------
  [Reland] "Do not apply calling conventions to MSVC entry points"

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
Revert of first attempt: bebfc3b92d5e8

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




More information about the All-commits mailing list