MLIR  20.0.0git
Functions
FunctionImplementation.cpp File Reference
#include "mlir/Interfaces/FunctionImplementation.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/SymbolTable.h"
#include "mlir/Interfaces/FunctionInterfaces.h"

Go to the source code of this file.

Functions

static ParseResult parseFunctionArgumentList (OpAsmParser &parser, bool allowVariadic, SmallVectorImpl< OpAsmParser::Argument > &arguments, bool &isVariadic)
 
static ParseResult parseFunctionResultList (OpAsmParser &parser, SmallVectorImpl< Type > &resultTypes, SmallVectorImpl< DictionaryAttr > &resultAttrs)
 Parse a function result list. More...
 
static void printFunctionResultList (OpAsmPrinter &p, ArrayRef< Type > types, ArrayAttr attrs)
 Print a function result list. More...
 

Function Documentation

◆ parseFunctionArgumentList()

static ParseResult parseFunctionArgumentList ( OpAsmParser parser,
bool  allowVariadic,
SmallVectorImpl< OpAsmParser::Argument > &  arguments,
bool &  isVariadic 
)
static

◆ parseFunctionResultList()

static ParseResult parseFunctionResultList ( OpAsmParser parser,
SmallVectorImpl< Type > &  resultTypes,
SmallVectorImpl< DictionaryAttr > &  resultAttrs 
)
static

Parse a function result list.

function-result-list ::= function-result-list-parens | non-function-type function-result-list-parens ::= ( ) | ( function-result-list-no-parens ) function-result-list-no-parens ::= function-result (, function-result)* function-result ::= type attribute-dict?

Definition at line 83 of file FunctionImplementation.cpp.

References mlir::AsmParser::parseCommaSeparatedList(), mlir::AsmParser::parseOptionalLParen(), mlir::AsmParser::parseOptionalRParen(), mlir::AsmParser::parseRParen(), and mlir::AsmParser::parseType().

Referenced by mlir::function_interface_impl::parseFunctionSignature().

◆ printFunctionResultList()

static void printFunctionResultList ( OpAsmPrinter p,
ArrayRef< Type types,
ArrayAttr  attrs 
)
static

Print a function result list.

The provided attrs must either be null, or contain a set of DictionaryAttrs of the same arity as types.

Definition at line 246 of file FunctionImplementation.cpp.

References mlir::AsmPrinter::getStream().

Referenced by mlir::function_interface_impl::printFunctionSignature().