[clang] [llvm] [HLSL] Add SPIR-V target type for StructuredBuffers (PR #132027)
Nathan Gauër via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 21 08:08:14 PDT 2025
================
@@ -711,13 +711,14 @@ BuiltinTypeDeclBuilder::addHandleAccessFunction(DeclarationName &Name,
using PH = BuiltinTypeMethodBuilder::PlaceHolder;
QualType ElemTy = getHandleElementType();
- // TODO: Map to an hlsl_device address space.
- QualType ElemPtrTy = AST.getPointerType(ElemTy);
- QualType ReturnTy = ElemTy;
+ QualType AddrSpaceElemTy =
+ AST.getAddrSpaceQualType(ElemTy, LangAS::hlsl_device);
+ QualType ElemPtrTy = AST.getPointerType(AddrSpaceElemTy);
+ // QualType ReturnTy = (IsRef ? AST.getLValueReferenceType(ElemTy) : ElemTy);
----------------
Keenuts wrote:
remove?
https://github.com/llvm/llvm-project/pull/132027
More information about the llvm-commits
mailing list