19 MCAsmParser *Parser =
nullptr;
20 AsmLexer *Lexer =
nullptr;
22 template <
bool (XCOFFAsmParser::*HandlerMethod)(StringRef, SMLoc)>
23 void addDirectiveHandler(StringRef Directive) {
25 std::make_pair(
this, HandleDirective<XCOFFAsmParser, HandlerMethod>);
27 getParser().addDirectiveHandler(Directive, Handler);
31 XCOFFAsmParser() =
default;
33 void Initialize(MCAsmParser &
P)
override {
35 Lexer = &Parser->getLexer();
39 addDirectiveHandler<&XCOFFAsmParser::ParseDirectiveCSect>(
".csect");
41 bool ParseDirectiveCSect(StringRef, SMLoc);
Generic interface for extending the MCAsmParser, which is implemented by target and object file assem...
virtual void Initialize(MCAsmParser &Parser)
Initialize the extension for parsing using the given Parser.
std::pair< MCAsmParserExtension *, DirectiveHandler > ExtensionDirectiveHandler
Represents a location in source code.
StringRef - Represent a constant reference to a string, i.e.
This is an optimization pass for GlobalISel generic memory operations.
MCAsmParserExtension * createXCOFFAsmParser()
LLVM_ABI void report_fatal_error(Error Err, bool gen_crash_diag=true)