[clang] [clang][SYCL Upstreaming] Add sycl_external attribute and restrict emitting device code (PR #140282)
Mariya Podchishchaeva via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 10 10:26:37 PDT 2025
================
@@ -476,6 +476,33 @@ The SYCL kernel in the previous code sample meets these expectations.
}];
}
+def SYCLExternalDocs : Documentation {
+ let Category = DocCatFunction;
+ let Heading = "sycl_external";
+ let Content = [{
+The ``sycl_external`` attribute (or the ``SYCL_EXTERNAL`` macro) can only be applied to
+functions, and indicates that the function must be treated as a device function and
+must be emitted even if it has no direct uses from other device functions.
+All ``sycl_external`` function callees implicitly inherit this attribute.
----------------
Fznamznon wrote:
I don't think they do.
```suggestion
```
https://github.com/llvm/llvm-project/pull/140282
More information about the cfe-commits
mailing list