================
@@ -17,6 +17,21 @@
 using namespace clang;
 using namespace CodeGen;
 
+void CodeGenFunction::EmitSYCLKernelCallStmt(const SYCLKernelCallStmt &S) {
+  if (getLangOpts().SYCLIsDevice) {
+    // A sycl_kernel_entry_point attributed function is unlikely to be emitted
+    // during device compilation, but might be if it is ODR-used from device
+    // code that is emitted. In these cases, the function is emitted with an
+    // empty body; the original body is emitted in the offload kernel entry
+    // point and the synthesized kernel launch code is only relevant for host
+    // compilation.
+    return;
----------------
tahonermann wrote:

That is a good idea. I'll poke around to see if I can find a good option.

https://github.com/llvm/llvm-project/pull/152403
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to