LLVM 20.0.0git
MCSPIRVStreamer.h
Go to the documentation of this file.
1//===- MCSPIRVStreamer.h - MCStreamer SPIR-V 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// Overrides MCObjectStreamer to disable all unnecessary features with stubs.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_MC_MCSPIRVSTREAMER_H
14#define LLVM_MC_MCSPIRVSTREAMER_H
15
20
21namespace llvm {
22class MCInst;
23class raw_ostream;
24
26public:
27 MCSPIRVStreamer(MCContext &Context, std::unique_ptr<MCAsmBackend> TAB,
28 std::unique_ptr<MCObjectWriter> OW,
29 std::unique_ptr<MCCodeEmitter> Emitter)
30 : MCObjectStreamer(Context, std::move(TAB), std::move(OW),
31 std::move(Emitter)) {}
32
34 return false;
35 }
37 Align ByteAlignment) override {}
38 void emitZerofill(MCSection *Section, MCSymbol *Symbol = nullptr,
39 uint64_t Size = 0, Align ByteAlignment = Align(1),
40 SMLoc Loc = SMLoc()) override {}
41
42private:
43 void emitInstToData(const MCInst &Inst, const MCSubtargetInfo &) override;
44};
45
46} // end namespace llvm
47
48#endif
dxil DXContainer Global Emitter
uint64_t Size
Context object for machine code objects.
Definition: MCContext.h:83
Instances of this class represent a single low-level machine instruction.
Definition: MCInst.h:185
Streaming object file generation interface.
void emitZerofill(MCSection *Section, MCSymbol *Symbol=nullptr, uint64_t Size=0, Align ByteAlignment=Align(1), SMLoc Loc=SMLoc()) override
Emit the zerofill section and an optional symbol.
bool emitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override
Add the given Attribute to Symbol.
void emitCommonSymbol(MCSymbol *Symbol, uint64_t Size, Align ByteAlignment) override
Emit a common symbol.
MCSPIRVStreamer(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:36
Generic base class for all target subtargets.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:41
Represents a location in source code.
Definition: SMLoc.h:23
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
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:1873
MCSymbolAttr
Definition: MCDirectives.h:18
Implement std::hash so that hash_code can be used in STL containers.
Definition: BitVector.h:858
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition: Alignment.h:39