================
@@ -266,6 +266,16 @@ class CIR_VectorTypeOf<list<Type> types, string summary = 
"">
             "vector of " # CIR_TypeSummaries<types>.value,
             summary)>;
 
+class CIR_VectorOf<Type T> : CIR_ConfinedType<
+  CIR_AnyVectorType,
+  [CIR_ElementTypePred<T.predicate>],
+  "CIR vector of " # T.summary>;
----------------
xlauko wrote:

```suggestion
// Element type constraint bases
class CIR_ElementTypePred<Pred pred> : SubstLeaves<"$_self",
    "::mlir::cast<::cir::VectorType>($_self).getElementType()", pred>;

class CIR_VectorTypeOf<list<Type> types, string summary = "">
    : CIR_ConfinedType<CIR_AnyVectorType,
        [Or<!foreach(type, types, CIR_ElementTypePred<type.predicate>)>],
        !if(!empty(summary),
            "vector of " # CIR_TypeSummaries<types>.value,
            summary)>;
```

https://github.com/llvm/llvm-project/pull/170427
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to