llvm/mlir/test/lib/Dialect/Test/TestFormatUtils.cpp

//===- TestFormatUtils.cpp - MLIR Test Dialect Assembly Format Utilities --===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "TestFormatUtils.h"
#include "mlir/IR/Builders.h"

usingnamespacemlir;
usingnamespacetest;

//===----------------------------------------------------------------------===//
// CustomDirectiveOperands
//===----------------------------------------------------------------------===//

ParseResult test::parseCustomDirectiveOperands(
    OpAsmParser &parser, OpAsmParser::UnresolvedOperand &operand,
    std::optional<OpAsmParser::UnresolvedOperand> &optOperand,
    SmallVectorImpl<OpAsmParser::UnresolvedOperand> &varOperands) {}

void test::printCustomDirectiveOperands(OpAsmPrinter &printer, Operation *,
                                        Value operand, Value optOperand,
                                        OperandRange varOperands) {}

//===----------------------------------------------------------------------===//
// CustomDirectiveResults
//===----------------------------------------------------------------------===//

ParseResult
test::parseCustomDirectiveResults(OpAsmParser &parser, Type &operandType,
                                  Type &optOperandType,
                                  SmallVectorImpl<Type> &varOperandTypes) {}

void test::printCustomDirectiveResults(OpAsmPrinter &printer, Operation *,
                                       Type operandType, Type optOperandType,
                                       TypeRange varOperandTypes) {}

//===----------------------------------------------------------------------===//
// CustomDirectiveWithTypeRefs
//===----------------------------------------------------------------------===//

ParseResult test::parseCustomDirectiveWithTypeRefs(
    OpAsmParser &parser, Type operandType, Type optOperandType,
    const SmallVectorImpl<Type> &varOperandTypes) {}

void test::printCustomDirectiveWithTypeRefs(OpAsmPrinter &printer,
                                            Operation *op, Type operandType,
                                            Type optOperandType,
                                            TypeRange varOperandTypes) {}

//===----------------------------------------------------------------------===//
// CustomDirectiveOperandsAndTypes
//===----------------------------------------------------------------------===//

ParseResult test::parseCustomDirectiveOperandsAndTypes(
    OpAsmParser &parser, OpAsmParser::UnresolvedOperand &operand,
    std::optional<OpAsmParser::UnresolvedOperand> &optOperand,
    SmallVectorImpl<OpAsmParser::UnresolvedOperand> &varOperands,
    Type &operandType, Type &optOperandType,
    SmallVectorImpl<Type> &varOperandTypes) {}

void test::printCustomDirectiveOperandsAndTypes(
    OpAsmPrinter &printer, Operation *op, Value operand, Value optOperand,
    OperandRange varOperands, Type operandType, Type optOperandType,
    TypeRange varOperandTypes) {}

//===----------------------------------------------------------------------===//
// CustomDirectiveRegions
//===----------------------------------------------------------------------===//

ParseResult test::parseCustomDirectiveRegions(
    OpAsmParser &parser, Region &region,
    SmallVectorImpl<std::unique_ptr<Region>> &varRegions) {}

void test::printCustomDirectiveRegions(OpAsmPrinter &printer, Operation *,
                                       Region &region,
                                       MutableArrayRef<Region> varRegions) {}

//===----------------------------------------------------------------------===//
// CustomDirectiveSuccessors
//===----------------------------------------------------------------------===//

ParseResult
test::parseCustomDirectiveSuccessors(OpAsmParser &parser, Block *&successor,
                                     SmallVectorImpl<Block *> &varSuccessors) {}

void test::printCustomDirectiveSuccessors(OpAsmPrinter &printer, Operation *,
                                          Block *successor,
                                          SuccessorRange varSuccessors) {}

//===----------------------------------------------------------------------===//
// CustomDirectiveAttributes
//===----------------------------------------------------------------------===//

ParseResult test::parseCustomDirectiveAttributes(OpAsmParser &parser,
                                                 IntegerAttr &attr,
                                                 IntegerAttr &optAttr) {}

void test::printCustomDirectiveAttributes(OpAsmPrinter &printer, Operation *,
                                          Attribute attribute,
                                          Attribute optAttribute) {}

//===----------------------------------------------------------------------===//
// CustomDirectiveAttrDict
//===----------------------------------------------------------------------===//

ParseResult test::parseCustomDirectiveAttrDict(OpAsmParser &parser,
                                               NamedAttrList &attrs) {}

void test::printCustomDirectiveAttrDict(OpAsmPrinter &printer, Operation *op,
                                        DictionaryAttr attrs) {}

//===----------------------------------------------------------------------===//
// CustomDirectiveOptionalOperandRef
//===----------------------------------------------------------------------===//

ParseResult test::parseCustomDirectiveOptionalOperandRef(
    OpAsmParser &parser,
    std::optional<OpAsmParser::UnresolvedOperand> &optOperand) {}

void test::printCustomDirectiveOptionalOperandRef(OpAsmPrinter &printer,
                                                  Operation *op,
                                                  Value optOperand) {}

//===----------------------------------------------------------------------===//
// CustomDirectiveOptionalOperand
//===----------------------------------------------------------------------===//

ParseResult test::parseCustomOptionalOperand(
    OpAsmParser &parser,
    std::optional<OpAsmParser::UnresolvedOperand> &optOperand) {}

void test::printCustomOptionalOperand(OpAsmPrinter &printer, Operation *,
                                      Value optOperand) {}

//===----------------------------------------------------------------------===//
// CustomDirectiveSwitchCases
//===----------------------------------------------------------------------===//

ParseResult
test::parseSwitchCases(OpAsmParser &p, DenseI64ArrayAttr &cases,
                       SmallVectorImpl<std::unique_ptr<Region>> &caseRegions) {}

void test::printSwitchCases(OpAsmPrinter &p, Operation *op,
                            DenseI64ArrayAttr cases, RegionRange caseRegions) {}

//===----------------------------------------------------------------------===//
// CustomUsingPropertyInCustom
//===----------------------------------------------------------------------===//

bool test::parseUsingPropertyInCustom(OpAsmParser &parser,
                                      SmallVector<int64_t> &value) {}

void test::printUsingPropertyInCustom(OpAsmPrinter &printer, Operation *op,
                                      ArrayRef<int64_t> value) {}

//===----------------------------------------------------------------------===//
// CustomDirectiveIntProperty
//===----------------------------------------------------------------------===//

bool test::parseIntProperty(OpAsmParser &parser, int64_t &value) {}

void test::printIntProperty(OpAsmPrinter &printer, Operation *op,
                            int64_t value) {}

//===----------------------------------------------------------------------===//
// CustomDirectiveSumProperty
//===----------------------------------------------------------------------===//

bool test::parseSumProperty(OpAsmParser &parser, int64_t &second,
                            int64_t first) {}

void test::printSumProperty(OpAsmPrinter &printer, Operation *op,
                            int64_t second, int64_t first) {}

//===----------------------------------------------------------------------===//
// CustomDirectiveOptionalCustomParser
//===----------------------------------------------------------------------===//

OptionalParseResult test::parseOptionalCustomParser(AsmParser &p,
                                                    IntegerAttr &result) {}

void test::printOptionalCustomParser(AsmPrinter &p, Operation *,
                                     IntegerAttr result) {}

//===----------------------------------------------------------------------===//
// CustomDirectiveAttrElideType
//===----------------------------------------------------------------------===//

ParseResult test::parseAttrElideType(AsmParser &parser, TypeAttr type,
                                     Attribute &attr) {}

void test::printAttrElideType(AsmPrinter &printer, Operation *op, TypeAttr type,
                              Attribute attr) {}