================
@@ -3753,6 +3754,32 @@ void MicrosoftCXXNameMangler::mangleType(const 
DependentBitIntType *T,
   Error(Range.getBegin(), "DependentBitInt type") << Range;
 }
 
+void MicrosoftCXXNameMangler::mangleType(const HLSLAttributedResourceType *T,
+                                         Qualifiers, SourceRange Range) {
+  mangleType(T->getWrappedType(), SourceRange(), QMM_Escape);
+  const HLSLAttributedResourceType::Attributes &Attrs = T->getAttrs();
+  // map resource class to HLSL virtual register letter
+  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 << 'b';
+    break;
+  case llvm::dxil::ResourceClass::Sampler:
+    Out << 's';
+    break;
+  }
----------------
hekota wrote:

The plan is to switch DirectX to Itanium ABI (llvm/llvm-project#110736). 
Changing the Microsoft mangling to just typename.

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