[clang] [clang] Add __has_feature(swiftcc) that checks whether the target supports the Swift calling convention (PR #72159)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 14 07:03:19 PST 2023


================
@@ -99,6 +99,9 @@ FEATURE(memory_sanitizer,
 FEATURE(thread_sanitizer, LangOpts.Sanitize.has(SanitizerKind::Thread))
 FEATURE(dataflow_sanitizer, LangOpts.Sanitize.has(SanitizerKind::DataFlow))
 FEATURE(scudo, LangOpts.Sanitize.hasOneOf(SanitizerKind::Scudo))
+FEATURE(swiftcc,
----------------
AaronBallman wrote:

This is not a `FEATURE`, it's an `EXTENSION`: https://github.com/llvm/llvm-project/blob/33374c445d31bfe5b8c638900a09e85d5bc409ee/clang/include/clang/Basic/Features.def#L20

I think the other swift calling convention should be fixed at the same time, that looks like a simple oversight.

https://github.com/llvm/llvm-project/pull/72159


More information about the cfe-commits mailing list