[clang] [HLSL] Add HLSLAttributedResourceType (PR #106181)

Helena Kotas via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 27 17:25:49 PDT 2024


================
@@ -799,6 +799,19 @@ static bool IsEquivalentExceptionSpec(StructuralEquivalenceContext &Context,
   return true;
 }
 
+// Determine structural equivalence of two instances of
+// HLSLAttributedResourceType::Attributes
+static bool
+IsStructurallyEquivalent(StructuralEquivalenceContext &Context,
+                         const HLSLAttributedResourceType::Attributes &Attrs1,
+                         const HLSLAttributedResourceType::Attributes &Attrs2) {
+  if (Attrs1.ResourceClass != Attrs2.ResourceClass)
----------------
hekota wrote:

I believe it is better to do the compare without any additional allocations.

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


More information about the cfe-commits mailing list