Back to home page

EIC code displayed by LXR

 
 

    


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

0001 //===- MCDXContainerStreamer.h - MCDXContainerStreamer 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 // The DXContainer format isn't a fully featured object format. It doesn't
0011 // support symbols, and initially it will not support instruction data since it
0012 // is used as a bitcode container for DXIL.
0013 //
0014 //===----------------------------------------------------------------------===//
0015 
0016 #ifndef LLVM_MC_MCDXCONTAINERSTREAMER_H
0017 #define LLVM_MC_MCDXCONTAINERSTREAMER_H
0018 
0019 #include "llvm/MC/MCAsmBackend.h"
0020 #include "llvm/MC/MCCodeEmitter.h"
0021 #include "llvm/MC/MCObjectStreamer.h"
0022 #include "llvm/MC/MCObjectWriter.h"
0023 
0024 namespace llvm {
0025 class MCInst;
0026 class raw_ostream;
0027 
0028 class MCDXContainerStreamer : public MCObjectStreamer {
0029 public:
0030   MCDXContainerStreamer(MCContext &Context, std::unique_ptr<MCAsmBackend> TAB,
0031                         std::unique_ptr<MCObjectWriter> OW,
0032                         std::unique_ptr<MCCodeEmitter> Emitter)
0033       : MCObjectStreamer(Context, std::move(TAB), std::move(OW),
0034                          std::move(Emitter)) {}
0035 
0036   bool emitSymbolAttribute(MCSymbol *, MCSymbolAttr) override { return false; }
0037   void emitCommonSymbol(MCSymbol *, uint64_t, Align) override {}
0038   void emitZerofill(MCSection *, MCSymbol *Symbol = nullptr, uint64_t Size = 0,
0039                     Align ByteAlignment = Align(1),
0040                     SMLoc Loc = SMLoc()) override {}
0041 
0042 private:
0043   void emitInstToData(const MCInst &, const MCSubtargetInfo &) override;
0044 };
0045 
0046 } // end namespace llvm
0047 
0048 #endif // LLVM_MC_MCDXCONTAINERSTREAMER_H