[clang] [HLSL][SPIR-V] Add hlsl_private address space for HLSL/SPIR-V (PR #122103)

Nathan Gauër via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 27 06:21:15 PDT 2025


================
@@ -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)
----------------
Keenuts wrote:

done thanks

https://github.com/llvm/llvm-project/pull/122103


More information about the cfe-commits mailing list