MLIR
20.0.0git
include
mlir
TableGen
Successor.h
Go to the documentation of this file.
1
//===- Successor.h - TableGen successor definitions -------------*- C++ -*-===//
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
#ifndef MLIR_TABLEGEN_SUCCESSOR_H_
10
#define MLIR_TABLEGEN_SUCCESSOR_H_
11
12
#include "
mlir/Support/LLVM.h
"
13
#include "
mlir/TableGen/Constraint.h
"
14
15
namespace
mlir
{
16
namespace
tblgen {
17
18
// Wrapper class providing helper methods for accessing Successor defined in
19
// TableGen.
20
class
Successor
:
public
Constraint
{
21
public
:
22
using
Constraint::Constraint
;
23
24
static
bool
classof
(
const
Constraint
*c) {
25
return
c->
getKind
() ==
CK_Successor
;
26
}
27
28
// Returns true if this successor is variadic.
29
bool
isVariadic
()
const
;
30
};
31
32
// A struct bundling a successor's constraint and its name.
33
struct
NamedSuccessor
{
34
// Returns true if this successor is variadic.
35
bool
isVariadic
()
const
{
return
constraint
.
isVariadic
(); }
36
37
StringRef
name
;
38
Successor
constraint
;
39
};
40
41
}
// namespace tblgen
42
}
// namespace mlir
43
44
#endif
// MLIR_TABLEGEN_SUCCESSOR_H_
Constraint.h
mlir::tblgen::Constraint
Definition:
Constraint.h:30
mlir::tblgen::Constraint::CK_Successor
@ CK_Successor
Definition:
Constraint.h:33
mlir::tblgen::Constraint::getKind
Kind getKind() const
Definition:
Constraint.h:76
mlir::tblgen::Constraint::Constraint
Constraint(const llvm::Record *record, Kind kind)
Definition:
Constraint.h:36
mlir::tblgen::Successor
Definition:
Successor.h:20
mlir::tblgen::Successor::isVariadic
bool isVariadic() const
Definition:
Successor.cpp:22
mlir::tblgen::Successor::classof
static bool classof(const Constraint *c)
Definition:
Successor.h:24
LLVM.h
mlir
Include the generated interface declarations.
Definition:
LocalAliasAnalysis.h:20
mlir::tblgen::NamedSuccessor
Definition:
Successor.h:33
mlir::tblgen::NamedSuccessor::constraint
Successor constraint
Definition:
Successor.h:38
mlir::tblgen::NamedSuccessor::isVariadic
bool isVariadic() const
Definition:
Successor.h:35
mlir::tblgen::NamedSuccessor::name
StringRef name
Definition:
Successor.h:37
Generated on Tue Nov 19 2024 08:32:23 for MLIR by
1.9.1