1//===- Argument.cpp - Argument definitions --------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#include "mlir/TableGen/Argument.h"
10#include "llvm/TableGen/Record.h"
11
12using namespace mlir;
13using namespace mlir::tblgen;
14
15//===----------------------------------------------------------------------===//
16// NamedTypeConstraint
17//===----------------------------------------------------------------------===//
18
19bool NamedTypeConstraint::hasPredicate() const {
20 return !constraint.getPredicate().isNull();
21}
22
23bool NamedTypeConstraint::isOptional() const { return constraint.isOptional(); }
24
25bool NamedTypeConstraint::isVariadic() const { return constraint.isVariadic(); }
26
27bool NamedTypeConstraint::isVariadicOfVariadic() const {
28 return constraint.isVariadicOfVariadic();
29}
30

source code of mlir/lib/TableGen/Argument.cpp