[clang] [CIR][SYCL] Emit SYCL device globals in the global address space (PR #229293)
David Rivera via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 5 19:51:30 PDT 2026
================
@@ -2300,16 +2300,7 @@ CIRGenModule::getAddrOfConstantStringFromLiteral(const StringLiteral *s,
}
LangAS CIRGenModule::getGlobalConstantAddressSpace() const {
- LangAS as =
- CodeGenUtils::getGlobalConstantAddressSpace(langOpts, getTarget());
- // CIR cannot represent SYCL address spaces yet.
- /// TODO: Remove this wrapper once CIR supports the global constant address
- /// space for SYCL.
- if (as == LangAS::sycl_global) {
- errorNYI("SYCL global constant address space");
- return LangAS::Default;
- }
- return as;
+ return CodeGenUtils::getGlobalConstantAddressSpace(langOpts, getTarget());
----------------
RiverDave wrote:
Shouldn't you invoke the CodeGenUtils helper directly from the callsites of this function?
https://github.com/llvm/llvm-project/pull/229293
More information about the cfe-commits
mailing list