File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,9 @@ FEATURE(memory_sanitizer,
102
102
FEATURE(thread_sanitizer, LangOpts.Sanitize.has(SanitizerKind::Thread))
103
103
FEATURE(dataflow_sanitizer, LangOpts.Sanitize.has(SanitizerKind::DataFlow))
104
104
FEATURE(scudo, LangOpts.Sanitize.hasOneOf(SanitizerKind::Scudo))
105
+ FEATURE(swiftcc,
106
+ PP.getTargetInfo().checkCallingConvention(CC_Swift) ==
107
+ clang::TargetInfo::CCCR_OK)
105
108
FEATURE(swiftasynccc,
106
109
PP.getTargetInfo().checkCallingConvention(CC_SwiftAsync) ==
107
110
clang::TargetInfo::CCCR_OK)
Original file line number Diff line number Diff line change 1
1
// RUN: %clang_cc1 -triple aarch64-unknown-windows-msvc -fsyntax-only %s -verify
2
2
// RUN: %clang_cc1 -triple thumbv7-unknown-windows-msvc -fsyntax-only %s -verify
3
3
// RUN: %clang_cc1 -triple x86_64-unknown-windows-msvc -fsyntax-only %s -verify
4
+ // RISC-V does not support swiftcall
5
+ // RUN: %clang_cc1 -triple riscv32-unknown-elf -fsyntax-only %s -verify
4
6
7
+ #if __has_feature (swiftcc )
5
8
// expected-no-diagnostics
6
-
9
+ #else
10
+ // expected-warning@+2 {{'__swiftcall__' calling convention is not supported for this target}}
11
+ #endif
7
12
void __attribute__((__swiftcall__ )) f (void ) {}
You can’t perform that action at this time.
0 commit comments