9#ifndef MLIR_TABLEGEN_GENINFO_H_
10#define MLIR_TABLEGEN_GENINFO_H_
13#include "llvm/ADT/StringRef.h"
25 std::function<
bool(
const llvm::RecordKeeper &records,
raw_ostream &os)>;
34 : arg(arg), description(description), generator(std::move(generator)) {}
38 assert(generator &&
"Cannot call generator with null generator");
54 StringRef description;
static const mlir::GenInfo * generator
GenInfo(StringRef arg, StringRef description, GenFunction generator)
GenInfo constructor should not be invoked directly, instead use GenRegistration or registerGen.
StringRef getGenDescription() const
Returns a description for the generator.
bool invoke(const llvm::RecordKeeper &records, raw_ostream &os) const
Invokes the generator and returns whether the generator failed.
StringRef getGenArgument() const
Returns the command line option that may be passed to 'mlir-tblgen' to invoke this generator.
The OpAsmOpInterface, see OpAsmInterface.td for more details.
Include the generated interface declarations.
std::function< bool(const llvm::RecordKeeper &records, raw_ostream &os)> GenFunction
Generator function to invoke.
GenRegistration(StringRef arg, StringRef description, const GenFunction &function)