================
@@ -6355,6 +6355,14 @@ LangAS CodeGenModule::GetGlobalVarAddressSpace(const
VarDecl *D) {
return getTargetCodeGenInfo().getGlobalVarAddressSpace(*this, D);
}
+bool CodeGenModule::isGlobalVarInvariant(const VarDecl *D) {
+ // Only OpenCL and CUDA device globals are handled here. On other targets,
----------------
keshavvinayak01 wrote:
HIP also sets `LangOpts.CUDA`, so HIP device mode reaches this path.
https://github.com/llvm/llvm-project/blob/805a81bd50ea1134f9816e4f328f5242a36a767b/clang/lib/Basic/LangOptions.cpp#L217-L218
https://github.com/llvm/llvm-project/pull/218356
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits