[clang] [HLSL] Make HLSLAttributedResourceType canonical and add code paths to convert HLSL types to DirectX target types (PR #110327)

Helena Kotas via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 30 12:31:01 PDT 2024


================
@@ -4488,6 +4488,30 @@ void CXXNameMangler::mangleType(const ArrayParameterType *T) {
   mangleType(cast<ConstantArrayType>(T));
 }
 
+void CXXNameMangler::mangleType(const HLSLAttributedResourceType *T) {
+  mangleType(T->getWrappedType());
+  const HLSLAttributedResourceType::Attributes &Attrs = T->getAttrs();
+  switch (Attrs.ResourceClass) {
+  case llvm::dxil::ResourceClass::UAV:
+    Out << 'U';
----------------
hekota wrote:

I have updated it to lower case letters (which is more common) and added a comment.

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


More information about the cfe-commits mailing list