LLVM  8.0.1
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
llvm::MCAsmParserExtension Class Reference

Generic interface for extending the MCAsmParser, which is implemented by target and object file assembly parser implementations. More...

#include "llvm/MC/MCParser/MCAsmParserExtension.h"

Inheritance diagram for llvm::MCAsmParserExtension:
Inheritance graph
[legend]
Collaboration diagram for llvm::MCAsmParserExtension:
Collaboration graph
[legend]

Public Member Functions

 MCAsmParserExtension (const MCAsmParserExtension &)=delete
 
MCAsmParserExtensionoperator= (const MCAsmParserExtension &)=delete
 
virtual ~MCAsmParserExtension ()
 
virtual void Initialize (MCAsmParser &Parser)
 Initialize the extension for parsing using the given Parser. More...
 
MCAsmParser Proxy Interfaces
MCContextgetContext ()
 
MCAsmLexergetLexer ()
 
const MCAsmLexergetLexer () const
 
MCAsmParsergetParser ()
 
const MCAsmParsergetParser () const
 
SourceMgrgetSourceManager ()
 
MCStreamergetStreamer ()
 
bool Warning (SMLoc L, const Twine &Msg)
 
bool Error (SMLoc L, const Twine &Msg, SMRange Range=SMRange())
 
void Note (SMLoc L, const Twine &Msg)
 
bool TokError (const Twine &Msg)
 
const AsmTokenLex ()
 
const AsmTokengetTok ()
 
bool parseToken (AsmToken::TokenKind T, const Twine &Msg="unexpected token")
 
bool parseMany (function_ref< bool()> parseOne, bool hasComma=true)
 
bool parseOptionalToken (AsmToken::TokenKind T)
 
bool check (bool P, const Twine &Msg)
 
bool check (bool P, SMLoc Loc, const Twine &Msg)
 
bool addErrorSuffix (const Twine &Suffix)
 
bool HasBracketExpressions () const
 

Protected Member Functions

 MCAsmParserExtension ()
 

Static Protected Member Functions

template<typename T , bool(T::*)(StringRef, SMLoc) Handler>
static bool HandleDirective (MCAsmParserExtension *Target, StringRef Directive, SMLoc DirectiveLoc)
 

Protected Attributes

bool BracketExpressionsSupported = false
 

Detailed Description

Generic interface for extending the MCAsmParser, which is implemented by target and object file assembly parser implementations.

Definition at line 26 of file MCAsmParserExtension.h.

Constructor & Destructor Documentation

◆ MCAsmParserExtension() [1/2]

MCAsmParserExtension::MCAsmParserExtension ( )
protecteddefault

◆ MCAsmParserExtension() [2/2]

llvm::MCAsmParserExtension::MCAsmParserExtension ( const MCAsmParserExtension )
delete

◆ ~MCAsmParserExtension()

MCAsmParserExtension::~MCAsmParserExtension ( )
virtualdefault

Member Function Documentation

◆ addErrorSuffix()

bool llvm::MCAsmParserExtension::addErrorSuffix ( const Twine Suffix)
inline

Definition at line 110 of file MCAsmParserExtension.h.

References llvm::MCAsmParser::addErrorSuffix(), and getParser().

◆ check() [1/2]

bool llvm::MCAsmParserExtension::check ( bool  P,
const Twine Msg 
)
inline

Definition at line 102 of file MCAsmParserExtension.h.

References llvm::MCAsmParser::check(), and getParser().

◆ check() [2/2]

bool llvm::MCAsmParserExtension::check ( bool  P,
SMLoc  Loc,
const Twine Msg 
)
inline

Definition at line 106 of file MCAsmParserExtension.h.

References llvm::MCAsmParser::check(), and getParser().

◆ Error()

bool llvm::MCAsmParserExtension::Error ( SMLoc  L,
const Twine Msg,
SMRange  Range = SMRange() 
)
inline

Definition at line 75 of file MCAsmParserExtension.h.

References llvm::MCAsmParser::Error(), and getParser().

◆ getContext()

MCContext& llvm::MCAsmParserExtension::getContext ( )
inline

◆ getLexer() [1/2]

MCAsmLexer& llvm::MCAsmParserExtension::getLexer ( )
inline

Definition at line 58 of file MCAsmParserExtension.h.

References llvm::MCAsmParser::getLexer(), and getParser().

Referenced by getLexer().

◆ getLexer() [2/2]

const MCAsmLexer& llvm::MCAsmParserExtension::getLexer ( ) const
inline

Definition at line 59 of file MCAsmParserExtension.h.

References getLexer().

◆ getParser() [1/2]

MCAsmParser& llvm::MCAsmParserExtension::getParser ( )
inline

◆ getParser() [2/2]

const MCAsmParser& llvm::MCAsmParserExtension::getParser ( ) const
inline

Definition at line 64 of file MCAsmParserExtension.h.

References getParser().

◆ getSourceManager()

SourceMgr& llvm::MCAsmParserExtension::getSourceManager ( )
inline

Definition at line 68 of file MCAsmParserExtension.h.

References getParser(), and llvm::MCAsmParser::getSourceManager().

◆ getStreamer()

MCStreamer& llvm::MCAsmParserExtension::getStreamer ( )
inline

Definition at line 69 of file MCAsmParserExtension.h.

References getParser(), and llvm::MCAsmParser::getStreamer().

◆ getTok()

const AsmToken& llvm::MCAsmParserExtension::getTok ( )
inline

Definition at line 88 of file MCAsmParserExtension.h.

References getParser(), and llvm::MCAsmParser::getTok().

◆ HandleDirective()

template<typename T , bool(T::*)(StringRef, SMLoc) Handler>
static bool llvm::MCAsmParserExtension::HandleDirective ( MCAsmParserExtension Target,
StringRef  Directive,
SMLoc  DirectiveLoc 
)
inlinestaticprotected

Definition at line 34 of file MCAsmParserExtension.h.

◆ HasBracketExpressions()

bool llvm::MCAsmParserExtension::HasBracketExpressions ( ) const
inline

Definition at line 114 of file MCAsmParserExtension.h.

References BracketExpressionsSupported.

◆ Initialize()

void MCAsmParserExtension::Initialize ( MCAsmParser Parser)
virtual

Initialize the extension for parsing using the given Parser.

The extension should use the AsmParser interfaces to register its parsing routines.

Definition at line 18 of file MCAsmParserExtension.cpp.

Referenced by llvm::MCAsmParser::setTargetParser().

◆ Lex()

const AsmToken& llvm::MCAsmParserExtension::Lex ( )
inline

Definition at line 87 of file MCAsmParserExtension.h.

References getParser(), and llvm::MCAsmParser::Lex().

◆ Note()

void llvm::MCAsmParserExtension::Note ( SMLoc  L,
const Twine Msg 
)
inline

Definition at line 79 of file MCAsmParserExtension.h.

References getParser(), and llvm::MCAsmParser::Note().

◆ operator=()

MCAsmParserExtension& llvm::MCAsmParserExtension::operator= ( const MCAsmParserExtension )
delete

◆ parseMany()

bool llvm::MCAsmParserExtension::parseMany ( function_ref< bool()>  parseOne,
bool  hasComma = true 
)
inline

Definition at line 94 of file MCAsmParserExtension.h.

References getParser(), and llvm::MCAsmParser::parseMany().

◆ parseOptionalToken()

bool llvm::MCAsmParserExtension::parseOptionalToken ( AsmToken::TokenKind  T)
inline

Definition at line 98 of file MCAsmParserExtension.h.

References getParser(), and llvm::MCAsmParser::parseOptionalToken().

◆ parseToken()

bool llvm::MCAsmParserExtension::parseToken ( AsmToken::TokenKind  T,
const Twine Msg = "unexpected token" 
)
inline

Definition at line 89 of file MCAsmParserExtension.h.

References getParser(), and llvm::MCAsmParser::parseToken().

◆ TokError()

bool llvm::MCAsmParserExtension::TokError ( const Twine Msg)
inline

Definition at line 83 of file MCAsmParserExtension.h.

References getParser(), and llvm::MCAsmParser::TokError().

◆ Warning()

bool llvm::MCAsmParserExtension::Warning ( SMLoc  L,
const Twine Msg 
)
inline

Definition at line 71 of file MCAsmParserExtension.h.

References getParser(), and llvm::MCAsmParser::Warning().

Member Data Documentation

◆ BracketExpressionsSupported

bool llvm::MCAsmParserExtension::BracketExpressionsSupported = false
protected

Definition at line 41 of file MCAsmParserExtension.h.

Referenced by HasBracketExpressions().


The documentation for this class was generated from the following files: