[clang] Document that the swiftcall and swiftasynccall attributes are ABI-unstable (PR #215915)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 12 15:52:54 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: John McCall (rjmccall)
<details>
<summary>Changes</summary>
...except on platforms where the Swift projects has declared ABI stability.
---
Full diff: https://github.com/llvm/llvm-project/pull/215915.diff
1 Files Affected:
- (modified) clang/include/clang/Basic/AttrDocs.td (+16)
``````````diff
diff --git a/clang/include/clang/Basic/AttrDocs.td b/clang/include/clang/Basic/AttrDocs.td
index 847e44688ed95..2dfc3b418f5e0 100644
--- a/clang/include/clang/Basic/AttrDocs.td
+++ b/clang/include/clang/Basic/AttrDocs.td
@@ -6462,6 +6462,14 @@ with ``__has_attribute(swiftcall)``. Query if the target supports the
calling convention with ``__has_extension(swiftcc)``. This implies
support for the ``swift_context``, ``swift_error_result``, and
``swift_indirect_result`` attributes.
+
+Since this attribute follows the Swift calling convention, it is
+considered ABI-unstable except on targets where the Swift project
+has declared ABI stability. Users are responsible for ensuring that
+calls and definitions of functions with this attribute are compiled
+with compatible compilers. Note that different operating systems
+on the same architecture may use different ABIs and therefore may
+have different standards for ABI stability.
}];
}
@@ -6512,6 +6520,14 @@ the following:
Query for this attribute with ``__has_attribute(swiftasynccall)``. Query if
the target supports the calling convention with
``__has_extension(swiftasynccc)``.
+
+Since this attribute follows the Swift async calling convention, it is
+considered ABI-unstable except on targets where the Swift project
+has declared ABI stability. Users are responsible for ensuring that
+calls and definitions of functions with this attribute are compiled
+with compatible compilers. Note that different operating systems
+on the same architecture may use different ABIs and therefore may
+have different standards for ABI stability.
}];
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/215915
More information about the cfe-commits
mailing list