[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
Thu Oct 10 08:24:50 PDT 2024


================
@@ -11533,6 +11539,18 @@ QualType ASTContext::mergeTypes(QualType LHS, QualType RHS, bool OfBlockPointer,
       return {};
     return LHS;
   }
+  case Type::HLSLAttributedResource: {
+    const HLSLAttributedResourceType *LHSTy =
+        LHS->castAs<HLSLAttributedResourceType>();
+    const HLSLAttributedResourceType *RHSTy =
+        RHS->castAs<HLSLAttributedResourceType>();
+
+    if (LHSTy->getWrappedType() == RHSTy->getWrappedType() &&
----------------
hekota wrote:

Yes it is. I guess I can change this to assert.

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


More information about the cfe-commits mailing list