eandrews added a comment.

In D87701#2280246 <https://reviews.llvm.org/D87701#2280246>, @dmajor wrote:
> This broke Firefox builds too, in one of our helper binaries that uses a 
> `wWinMain`, although I'm having trouble writing a minimal reproducer for it. 
> Simply making a barebones `wWinMain` program doesn't hit the error.
>
> If the patch re-lands, please cc me and I'll re-test.

Will do.  I think MSVC applies calling conventions to entry points when it is 
specified in function signature.

  int WinMain(int argc) {return 1;}

Compiling this with /Gr generates symbol ` _WinMain@4` , meaning `/Gr` was 
ignored and fastcall was not applied to WinMain.  But,

  int __fastcall WinMain(int argc) {return 1;}

generates symbol ` @WinMain@4`, meaning __fastcall calling convention was 
applied to WinMain.

It also looks like stdcall is default calling convention for WinMain.

Anyway, I'll upload a new patch for review once I understand the required 
behavior better.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87701/new/

https://reviews.llvm.org/D87701

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [P... Elizabeth Andrews via Phabricator via cfe-commits
    • ... Reid "Away June-Sep" Kleckner via Phabricator via cfe-commits
    • ... Elizabeth Andrews via Phabricator via cfe-commits
    • ... Elizabeth Andrews via Phabricator via cfe-commits
    • ... Amy Huang via Phabricator via cfe-commits
    • ... Amy Huang via Phabricator via cfe-commits
    • ... dmajor via Phabricator via cfe-commits
    • ... Elizabeth Andrews via Phabricator via cfe-commits

Reply via email to