================
@@ -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 &&
----------------
Fznamznon wrote:

SYCL 2020 only allows const/constexpr constant-initialized global variables, so 
I don't think this is currently important for SYCL therefore I don't want to 
block this with SYCL. We can revisit this later if device_global extension ever 
makes it here which I assume won't be happening soon.

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