LLVM 20.0.0git
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
10
11using namespace llvm;
12
13namespace {
14
15class GOFFAsmParser : public MCAsmParserExtension {
16 template <bool (GOFFAsmParser::*HandlerMethod)(StringRef, SMLoc)>
17 void addDirectiveHandler(StringRef Directive) {
19 std::make_pair(this, HandleDirective<GOFFAsmParser, HandlerMethod>);
20
22 }
23
24public:
25 GOFFAsmParser() = default;
26
27 void Initialize(MCAsmParser &Parser) override {
28 // Call the base implementation.
30 }
31};
32
33} // namespace
34
35namespace llvm {
36
37MCAsmParserExtension *createGOFFAsmParser() { return new GOFFAsmParser; }
38
39} // namespace llvm
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.
Generic assembler parser interface, for use by target specific assembly parsers.
Definition: MCAsmParser.h:123
std::pair< MCAsmParserExtension *, DirectiveHandler > ExtensionDirectiveHandler
Definition: MCAsmParser.h:127
virtual void addDirectiveHandler(StringRef Directive, ExtensionDirectiveHandler Handler)=0
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
MCAsmParserExtension * createGOFFAsmParser()