Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:44:15

0001 //===- MCSPIRVStreamer.h - MCStreamer SPIR-V Object File Interface -*- C++ ===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 // Overrides MCObjectStreamer to disable all unnecessary features with stubs.
0010 //
0011 //===----------------------------------------------------------------------===//
0012 
0013 #ifndef LLVM_MC_MCSPIRVSTREAMER_H
0014 #define LLVM_MC_MCSPIRVSTREAMER_H
0015 
0016 #include "llvm/MC/MCAsmBackend.h"
0017 #include "llvm/MC/MCCodeEmitter.h"
0018 #include "llvm/MC/MCObjectStreamer.h"
0019 #include "llvm/MC/MCObjectWriter.h"
0020 
0021 namespace llvm {
0022 class MCInst;
0023 class raw_ostream;
0024 
0025 class MCSPIRVStreamer : public MCObjectStreamer {
0026 public:
0027   MCSPIRVStreamer(MCContext &Context, std::unique_ptr<MCAsmBackend> TAB,
0028                   std::unique_ptr<MCObjectWriter> OW,
0029                   std::unique_ptr<MCCodeEmitter> Emitter)
0030       : MCObjectStreamer(Context, std::move(TAB), std::move(OW),
0031                          std::move(Emitter)) {}
0032 
0033   bool emitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override {
0034     return false;
0035   }
0036   void emitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
0037                         Align ByteAlignment) override {}
0038   void emitZerofill(MCSection *Section, MCSymbol *Symbol = nullptr,
0039                     uint64_t Size = 0, Align ByteAlignment = Align(1),
0040                     SMLoc Loc = SMLoc()) override {}
0041 
0042 private:
0043   void emitInstToData(const MCInst &Inst, const MCSubtargetInfo &) override;
0044 };
0045 
0046 } // end namespace llvm
0047 
0048 #endif