-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ARM64EC] Add support for parsing __vectorcall (#87725)
MSVC doesn't support generating __vectorcall calls in Arm64EC mode, but it does treat it as a distinct type. The Microsoft STL depends on this functionality. (Not sure if this is intentional.) Add support for parsing the same way as MSVC, and add some checks to ensure we don't try to actually generate code. The error handling in CodeGen is ugly, but I can't think of a better way to do it.
- Loading branch information
1 parent
4c6ae8e
commit 71097e9
Showing
4 changed files
with
32 additions
and
1 deletion.
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
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,14 @@ | ||
// RUN: %clang_cc1 -triple arm64ec-windows-msvc -emit-llvm -o - %s -verify | ||
|
||
// ARM64EC doesn't support generating __vectorcall calls... but __vectorcall | ||
// function types need to be distinct from __cdecl function types to support | ||
// compiling the STL. Make sure we only diagnose constructs that actually | ||
// require generating code. | ||
void __vectorcall f1(); | ||
void f2(void __vectorcall p()) {} | ||
void f2(void p()) {} | ||
void __vectorcall (*f3)(); | ||
void __vectorcall f4(); // expected-error {{__vectorcall}} | ||
void __vectorcall f5() { // expected-error {{__vectorcall}} | ||
f4(); // expected-error{{__vectorcall}} | ||
} |