Skip to content

Commit 875e514

Browse files
committed
Only use opt for nvptx.
Signed-off-by: JackAKirk <[email protected]>
1 parent 694bf67 commit 875e514

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/CodeGen/CodeGenModule.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5755,7 +5755,7 @@ LangAS CodeGenModule::GetGlobalVarAddressSpace(const VarDecl *D) {
57555755
}
57565756

57575757
if (LangOpts.SYCLIsDevice && D) {
5758-
if (D->hasAttr<SYCLGlobalVarAttr>())
5758+
if (getTriple().isNVPTX() && D->hasAttr<SYCLGlobalVarAttr>())
57595759
return LangAS::sycl_global;
57605760

57615761
auto *Scope = D->getAttr<SYCLScopeAttr>();

0 commit comments

Comments
 (0)