[clang] [HLSL][SPIR-V] Add hlsl_private address space for HLSL/SPIR-V (PR #122103)
Helena Kotas via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 10 18:01:06 PDT 2025
Nathan =?utf-8?q?Gauër?= <brioche at google.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/122103 at github.com>
================
@@ -5386,6 +5386,23 @@ LangAS CodeGenModule::GetGlobalVarAddressSpace(const VarDecl *D) {
if (OpenMPRuntime->hasAllocateAttributeForGlobalVar(D, AS))
return AS;
}
+
+ if (LangOpts.HLSL) {
+ if (D == nullptr)
+ return LangAS::hlsl_private;
+
+ // Except resources (Uniform, UniformConstant) & instanglble (handles)
----------------
hekota wrote:
```suggestion
// Except resources (Uniform, UniformConstant) & intangible (handles)
```
https://github.com/llvm/llvm-project/pull/122103
More information about the cfe-commits
mailing list