[clang] [SYCL] SYCL host kernel launch support for the sycl_kernel_entry_point attribute. (PR #152403)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 3 06:19:22 PST 2026
================
@@ -17,6 +17,22 @@
using namespace clang;
using namespace CodeGen;
+void CodeGenFunction::EmitSYCLKernelCallStmt(const SYCLKernelCallStmt &S) {
+ if (getLangOpts().SYCLIsDevice) {
+ // A definition for a sycl_kernel_entry_point attributed function should
+ // never be emitted during device compilation; a diagnostic should be
+ // issued for any such ODR-use.
+ assert(false && "Attempt to emit a sycl_kernel_entry_point function during "
----------------
erichkeane wrote:
Thats not how we operate at all. This should jsut be an `assert(!getLangOpts().SYCLIsDevice) `, like everywhere else. We don't make the 'can be used in an exploit' as justification anywhere in the compiler. Unless you are promising to make the rest of the compiler 'exploit clean in the case of asserts' everywhere before continuing with other work, this is a no from me.
https://github.com/llvm/llvm-project/pull/152403
More information about the cfe-commits
mailing list