forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang] Add
__has_extension(swiftcc)
support (llvm#85347)
- Loading branch information
1 parent
7be1e8a
commit f27fa9b
Showing
4 changed files
with
33 additions
and
6 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
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 |
---|---|---|
@@ -1,7 +1,19 @@ | ||
// RUN: %clang_cc1 -triple aarch64-unknown-windows-msvc -fsyntax-only %s -verify | ||
// RUN: %clang_cc1 -triple thumbv7-unknown-windows-msvc -fsyntax-only %s -verify | ||
// RUN: %clang_cc1 -triple x86_64-unknown-windows-msvc -fsyntax-only %s -verify | ||
// RISC-V does not support swiftcall | ||
// RUN: %clang_cc1 -triple riscv32-unknown-elf -fsyntax-only %s -verify | ||
|
||
#if __has_extension(swiftcc) | ||
// expected-no-diagnostics | ||
|
||
#else | ||
// expected-warning@+2 {{'__swiftcall__' calling convention is not supported for this target}} | ||
#endif | ||
void __attribute__((__swiftcall__)) f(void) {} | ||
|
||
#if __has_extension(swiftasynccc) | ||
// expected-no-diagnostics | ||
#else | ||
// expected-warning@+2 {{'__swiftasynccall__' calling convention is not supported for this target}} | ||
#endif | ||
void __attribute__((__swiftasynccall__)) g(void) {} |