We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 48a75f4 commit 8c38edaCopy full SHA for 8c38eda
clang/lib/CodeGen/CodeGenModule.cpp
@@ -5758,6 +5758,10 @@ LangAS CodeGenModule::GetGlobalVarAddressSpace(const VarDecl *D) {
5758
auto *Scope = D->getAttr<SYCLScopeAttr>();
5759
if (Scope && Scope->isWorkGroup())
5760
return LangAS::sycl_local;
5761
+
5762
+ const RecordDecl *RD = D->getType()->getAsRecordDecl();
5763
+ if (getTriple().isNVPTX() && RD && RD->hasAttr<SYCLDeviceGlobalAttr>() && D->getType().isConstQualified())
5764
+ return LangAS::cuda_constant;
5765
}
5766
5767
if (LangOpts.SYCLIsDevice &&
0 commit comments