================
@@ -1899,6 +1899,27 @@ void 
CodeGenModule::setGlobalVisibility(llvm::GlobalValue *GV,
     return;
   }
 
+  // CUDA/HIP device kernels and global variables must be visible to the host
+  // so they can be registered / initialized. We require protected visibility
+  // unless the user explicitly requested hidden via an attribute.
+  if (Context.getLangOpts().CUDAIsDevice &&
----------------
sarnex wrote:

Maybe @tahonermann or @Fznamznon can chime in to see if something similar makes 
sense for SYCL.

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

Reply via email to