================
@@ -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';
+    break;
+  case llvm::dxil::ResourceClass::SRV:
+    Out << 'T';
+    break;
+  case llvm::dxil::ResourceClass::CBuffer:
+    Out << 'C';
+    break;
+  case llvm::dxil::ResourceClass::Sampler:
+    Out << 'S';
+    break;
+  }
----------------
damyanp wrote:

default case? Or is it intentional that unknown resource classes don't add the 
extra character?

https://github.com/llvm/llvm-project/pull/110327
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to