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 5c91609 commit 91da13eCopy full SHA for 91da13e
clang/lib/CodeGen/CodeGenModule.cpp
@@ -3887,13 +3887,13 @@ LangAS CodeGenModule::GetGlobalVarAddressSpace(const VarDecl *D) {
3887
}
3888
3889
if (LangOpts.SYCLIsDevice) {
3890
+ if (!D)
3891
+ return LangAS::opencl_global;
3892
auto *Scope = D->getAttr<SYCLScopeAttr>();
-
3893
if (Scope && Scope->isWorkGroup())
3894
return LangAS::opencl_local;
- if (!D || D->getType().getAddressSpace() == LangAS::Default) {
3895
+ if (D->getType().getAddressSpace() == LangAS::Default)
3896
return LangAS::opencl_global;
- }
3897
3898
3899
if (LangOpts.CUDA && LangOpts.CUDAIsDevice) {
0 commit comments