LLVM
17.0.0git
lib
MC
MCParser
GOFFAsmParser.cpp
Go to the documentation of this file.
1
//===- GOFFAsmParser.cpp - GOFF Assembly Parser ---------------------------===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
9
#include "
llvm/MC/MCParser/MCAsmParserExtension.h
"
10
11
using namespace
llvm
;
12
13
namespace
{
14
15
class
GOFFAsmParser :
public
MCAsmParserExtension
{
16
template
<
bool
(GOFFAsmParser::*HandlerMethod)(StringRef, SMLoc)>
17
void
addDirectiveHandler(
StringRef
Directive
) {
18
MCAsmParser::ExtensionDirectiveHandler
Handler =
19
std::make_pair(
this
, HandleDirective<GOFFAsmParser, HandlerMethod>);
20
21
getParser().addDirectiveHandler(
Directive
, Handler);
22
}
23
24
public
:
25
GOFFAsmParser() =
default
;
26
27
void
Initialize(
MCAsmParser
&Parser)
override
{
28
// Call the base implementation.
29
this->
MCAsmParserExtension::Initialize
(Parser);
30
}
31
};
32
33
}
// namespace
34
35
namespace
llvm
{
36
37
MCAsmParserExtension
*
createGOFFAsmParser
() {
return
new
GOFFAsmParser; }
38
39
}
// namespace llvm
llvm::MCAsmParser
Generic assembler parser interface, for use by target specific assembly parsers.
Definition:
MCAsmParser.h:123
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:18
llvm::MCAsmParser::ExtensionDirectiveHandler
std::pair< MCAsmParserExtension *, DirectiveHandler > ExtensionDirectiveHandler
Definition:
MCAsmParser.h:127
llvm::MCAsmParserExtension::Initialize
virtual void Initialize(MCAsmParser &Parser)
Initialize the extension for parsing using the given Parser.
Definition:
MCAsmParserExtension.cpp:21
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition:
StringRef.h:50
llvm::MCAsmParserExtension
Generic interface for extending the MCAsmParser, which is implemented by target and object file assem...
Definition:
MCAsmParserExtension.h:24
llvm::createGOFFAsmParser
MCAsmParserExtension * createGOFFAsmParser()
Definition:
GOFFAsmParser.cpp:37
MCAsmParserExtension.h
llvm::Directive
Definition:
DirectiveEmitter.h:100
Generated on Sat Jan 28 2023 09:44:40 for LLVM by
1.8.17