2018-12-06 03:28:37 +00:00
|
|
|
// 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
|
2024-03-20 21:18:57 +09:00
|
|
|
// RISC-V does not support swiftcall
|
|
|
|
// RUN: %clang_cc1 -triple riscv32-unknown-elf -fsyntax-only %s -verify
|
2018-12-06 03:28:37 +00:00
|
|
|
|
2024-03-20 21:18:57 +09:00
|
|
|
#if __has_extension(swiftcc)
|
2018-12-06 03:28:37 +00:00
|
|
|
// expected-no-diagnostics
|
2024-03-20 21:18:57 +09:00
|
|
|
#else
|
|
|
|
// expected-warning@+2 {{'__swiftcall__' calling convention is not supported for this target}}
|
|
|
|
#endif
|
2018-12-06 03:28:37 +00:00
|
|
|
void __attribute__((__swiftcall__)) f(void) {}
|
2024-03-20 21:18:57 +09:00
|
|
|
|
|
|
|
#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) {}
|