MLIR  16.0.0git
Functions
DialectSymbolParser.cpp File Reference
#include "AsmParserImpl.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/Dialect.h"
#include "mlir/IR/DialectImplementation.h"
#include "llvm/Support/SourceMgr.h"
+ Include dependency graph for DialectSymbolParser.cpp:

Go to the source code of this file.

Functions

template<typename Symbol , typename SymbolAliasMap , typename CreateFn >
static Symbol parseExtendedSymbol (Parser &p, SymbolAliasMap &aliases, CreateFn &&createSymbol)
 Parse an extended dialect symbol. More...
 
template<typename T , typename ParserFn >
static T parseSymbol (StringRef inputStr, MLIRContext *context, size_t &numRead, ParserFn &&parserFn)
 Parses a symbol, of type 'T', and returns it if parsing was successful. More...
 

Function Documentation

◆ parseExtendedSymbol()

template<typename Symbol , typename SymbolAliasMap , typename CreateFn >
static Symbol parseExtendedSymbol ( Parser p,
SymbolAliasMap &  aliases,
CreateFn &&  createSymbol 
)
static

◆ parseSymbol()

template<typename T , typename ParserFn >
static T parseSymbol ( StringRef  inputStr,
MLIRContext context,
size_t &  numRead,
ParserFn &&  parserFn 
)
static

Parses a symbol, of type 'T', and returns it if parsing was successful.

If parsing failed, nullptr is returned. The number of bytes read from the input string is returned in 'numRead'.

Definition at line 301 of file DialectSymbolParser.cpp.

References mlir::detail::Parser::getContext(), mlir::Token::getLoc(), mlir::detail::Parser::getSourceMgr(), and mlir::detail::Parser::getToken().