LLVM 24.0.0git
MCWasmStreamer.h
Go to the documentation of this file.
1//===- MCWasmStreamer.h - MCStreamer Wasm Object File Interface -*- C++ -*-===//
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#ifndef LLVM_MC_MCWASMSTREAMER_H
10#define LLVM_MC_MCWASMSTREAMER_H
11
12#include "MCAsmBackend.h"
13#include "MCCodeEmitter.h"
18
19namespace llvm {
20class MCExpr;
21
23public:
24 MCWasmStreamer(MCContext &Context, std::unique_ptr<MCAsmBackend> TAB,
25 std::unique_ptr<MCObjectWriter> OW,
26 std::unique_ptr<MCCodeEmitter> Emitter)
27 : MCObjectStreamer(Context, std::move(TAB), std::move(OW),
28 std::move(Emitter)) {}
29
30 ~MCWasmStreamer() override;
31
32 /// \name MCStreamer Interface
33 /// @{
34
35 void changeSection(MCSection *Section, uint32_t Subsection) override;
36 void emitLabel(MCSymbol *Symbol, SMLoc Loc = SMLoc()) override;
38 uint64_t Offset) override;
39 bool emitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override;
41 Align ByteAlignment) override;
42
43 void emitELFSize(MCSymbol *Symbol, const MCExpr *Value) override;
44
46 Align ByteAlignment) override;
47
48 void emitIdent(StringRef IdentString) override;
49
50 void finishImpl() override;
51};
52
53} // end namespace llvm
54
55#endif
uint64_t uint64_t
#define LLVM_ABI
Definition Compiler.h:211
dxil container DXContainer Global Emitter
#define F(x, y, z)
Definition MD5.cpp:54
Functions, function parameters, and return types can have attributes to indicate how they should be t...
Definition Attributes.h:106
Context object for machine code objects.
Definition MCContext.h:84
Base class for the full range of assembler expressions which are needed for parsing.
Definition MCExpr.h:31
MCObjectStreamer(MCContext &Context, std::unique_ptr< MCAsmBackend > TAB, std::unique_ptr< MCObjectWriter > OW, std::unique_ptr< MCCodeEmitter > Emitter)
Instances of this class represent a uniqued identifier for a section in the current translation unit.
Definition MCSection.h:577
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition MCSymbol.h:42
void emitCommonSymbol(MCSymbol *Symbol, uint64_t Size, Align ByteAlignment) override
Emit a common symbol.
void emitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size, Align ByteAlignment) override
Emit a local common (.lcomm) symbol.
MCWasmStreamer(MCContext &Context, std::unique_ptr< MCAsmBackend > TAB, std::unique_ptr< MCObjectWriter > OW, std::unique_ptr< MCCodeEmitter > Emitter)
void emitLabelAtPos(MCSymbol *Symbol, SMLoc Loc, MCFragment &F, uint64_t Offset) override
void emitIdent(StringRef IdentString) override
Emit the "identifiers" directive.
void emitLabel(MCSymbol *Symbol, SMLoc Loc=SMLoc()) override
Emit a label for Symbol into the current section.
~MCWasmStreamer() override
void changeSection(MCSection *Section, uint32_t Subsection) override
This is called by popSection and switchSection, if the current section changes.
void finishImpl() override
Streamer specific finalization.
void emitELFSize(MCSymbol *Symbol, const MCExpr *Value) override
Emit an ELF .size directive.
bool emitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override
Add the given Attribute to Symbol.
Represents a location in source code.
Definition SMLoc.h:22
Represent a constant reference to a string, i.e.
Definition StringRef.h:56
LLVM Value Representation.
Definition Value.h:75
This is an optimization pass for GlobalISel generic memory operations.
@ Offset
Definition DWP.cpp:577
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Definition STLExtras.h:1933
Implement std::hash so that hash_code can be used in STL containers.
Definition BitVector.h:879
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition Alignment.h:39