21 function_ref<InFlightDiagnostic()> emitError, SymbolRefAttr , ArrayAttr params
27 SymbolTableCollection &symbolTable, Operation *op,
bool reportMissing
36 if (failed(res) || !res.value()) {
47 size_t numExpected = 0;
51 if (typeParams.size() != numExpected) {
52 return op->emitError() <<
'\'' <<
StructType::name <<
"' type has " << typeParams.size()
53 <<
" parameters but \"" << res.value().get().getSymName()
54 <<
"\" expects " << numExpected;
69 return lookup->get().hasColumns();
static constexpr ::llvm::StringLiteral getOperationName()
::mlir::SymbolRefAttr getNameRef() const
mlir::LogicalResult hasColumns(mlir::SymbolTableCollection &symbolTable, mlir::Operation *op) const
Returns wether the struct this type refers to has members marked as columns.
::mlir::FailureOr< SymbolLookupResult< StructDefOp > > getDefinition(::mlir::SymbolTableCollection &symbolTable, ::mlir::Operation *op, bool reportMissing=true) const
Gets the struct op that defines this struct.
::llvm::LogicalResult verify(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::SymbolRefAttr nameRef, ::mlir::ArrayAttr params)
::mlir::ArrayAttr getParams() const
::mlir::LogicalResult verifySymbolRef(::mlir::SymbolTableCollection &symbolTable, ::mlir::Operation *op)
static constexpr ::llvm::StringLiteral name
mlir::FailureOr< SymbolLookupResultUntyped > lookupTopLevelSymbol(mlir::SymbolTableCollection &tables, mlir::SymbolRefAttr symbol, mlir::Operation *origin, bool reportMissing=true)
OpClass getParentOfType(mlir::Operation *op)
Return the closest surrounding parent operation that is of type 'OpClass'.
OwningEmitErrorFn wrapNonNullableInFlightDiagnostic(llvm::function_ref< mlir::InFlightDiagnostic()> emitError)
LogicalResult verifyStructTypeParams(EmitErrorFn emitError, ArrayAttr params)