aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaLookup.cpp
diff options
context:
space:
mode:
authorHelena Kotas <hekotas@microsoft.com>2024-10-15 13:38:15 -0700
committerGitHub <noreply@github.com>2024-10-15 13:38:15 -0700
commit3b4512074e8d2790794a49ea675f8a4af5817e60 (patch)
tree5bb0455412e9b1e914c4a4c0e38415f90e100bf2 /clang/lib/Sema/SemaLookup.cpp
parent97da5e670099848f7d136a6988afd6ea638e2210 (diff)
downloadllvm-3b4512074e8d2790794a49ea675f8a4af5817e60.zip
llvm-3b4512074e8d2790794a49ea675f8a4af5817e60.tar.gz
llvm-3b4512074e8d2790794a49ea675f8a4af5817e60.tar.bz2
[HLSL] Make HLSLAttributedResourceType canonical and add code paths to convert HLSL types to DirectX target types (#110327)
Translates `RWBuffer` and `StructuredBuffer` resources buffer types to DirectX target types `dx.TypedBuffer` and `dx.RawBuffer`. Includes a change of `HLSLAttributesResourceType` from 'sugar' type to full canonical type. This is required for codegen and other clang infrastructure to work property on HLSL resource types. Fixes #95952 (part 2/2)
Diffstat (limited to 'clang/lib/Sema/SemaLookup.cpp')
-rw-r--r--clang/lib/Sema/SemaLookup.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp
index f3f6247..e5db113 100644
--- a/clang/lib/Sema/SemaLookup.cpp
+++ b/clang/lib/Sema/SemaLookup.cpp
@@ -3215,6 +3215,9 @@ addAssociatedClassesAndNamespaces(AssociatedLookup &Result, QualType Ty) {
// Array parameter types are treated as fundamental types.
case Type::ArrayParameter:
break;
+
+ case Type::HLSLAttributedResource:
+ T = cast<HLSLAttributedResourceType>(T)->getWrappedType().getTypePtr();
}
if (Queue.empty())