LLVM  15.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 
16 #include "llvm/MC/MCAsmBackend.h"
17 #include "llvm/MC/MCCodeEmitter.h"
19 #include "llvm/MC/MCObjectWriter.h"
20 
21 namespace llvm {
22 class MCInst;
23 class raw_ostream;
24 
26 public:
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  unsigned ByteAlignment) override {}
38  void emitZerofill(MCSection *Section, MCSymbol *Symbol = nullptr,
39  uint64_t Size = 0, unsigned ByteAlignment = 0,
40  SMLoc Loc = SMLoc()) override {}
41 
42 private:
43  void emitInstToData(const MCInst &Inst, const MCSubtargetInfo &) override;
44 };
45 
46 } // end namespace llvm
47 
48 #endif
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
llvm::MCSymbol
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:41
llvm::MCContext
Context object for machine code objects.
Definition: MCContext.h:76
llvm::Attribute
Definition: Attributes.h:65
MCCodeEmitter.h
llvm::MCSPIRVStreamer::emitZerofill
void emitZerofill(MCSection *Section, MCSymbol *Symbol=nullptr, uint64_t Size=0, unsigned ByteAlignment=0, SMLoc Loc=SMLoc()) override
Emit the zerofill section and an optional symbol.
Definition: MCSPIRVStreamer.h:38
llvm::MCSPIRVStreamer::MCSPIRVStreamer
MCSPIRVStreamer(MCContext &Context, std::unique_ptr< MCAsmBackend > TAB, std::unique_ptr< MCObjectWriter > OW, std::unique_ptr< MCCodeEmitter > Emitter)
Definition: MCSPIRVStreamer.h:27
llvm::MCInst
Instances of this class represent a single low-level machine instruction.
Definition: MCInst.h:184
llvm::MCSymbolAttr
MCSymbolAttr
Definition: MCDirectives.h:18
llvm::MCSPIRVStreamer
Definition: MCSPIRVStreamer.h:25
Context
LLVMContext & Context
Definition: NVVMIntrRange.cpp:66
MCObjectStreamer.h
MCAsmBackend.h
llvm::SMLoc
Represents a location in source code.
Definition: SMLoc.h:23
llvm::MCObjectStreamer
Streaming object file generation interface.
Definition: MCObjectStreamer.h:42
uint64_t
llvm::move
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:1675
llvm::MCSPIRVStreamer::emitCommonSymbol
void emitCommonSymbol(MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) override
Emit a common symbol.
Definition: MCSPIRVStreamer.h:36
llvm::MCSection
Instances of this class represent a uniqued identifier for a section in the current translation unit.
Definition: MCSection.h:39
MCObjectWriter.h
std
Definition: BitVector.h:851
llvm::LCOMM::ByteAlignment
@ ByteAlignment
Definition: MCAsmInfo.h:50
llvm::ARMBuildAttrs::Symbol
@ Symbol
Definition: ARMBuildAttributes.h:83
llvm::MCSubtargetInfo
Generic base class for all target subtargets.
Definition: MCSubtargetInfo.h:76
llvm::MCSPIRVStreamer::emitSymbolAttribute
bool emitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override
Add the given Attribute to Symbol.
Definition: MCSPIRVStreamer.h:33