[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:38 PDT 2025


================
@@ -29,21 +29,10 @@ int foo() {
 }
 
 template <typename Name, typename Func>
-__attribute__((sycl_kernel)) void kernel_single_task(const Func &kernelFunc) {
+[[clang::sycl_external]] void kernel_single_task(const Func &kernelFunc) {
----------------
Fznamznon wrote:

I think it was meant to be a kernel, so sycl_kernel_entry_point attribute would be appropriate here.
```suggestion
[[clang::sycl_kernel_entry_point]] void kernel_single_task(const Func &kernelFunc) {
```

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


More information about the cfe-commits mailing list