1 //===- MCXCOFFObjectStreamer.h - MCStreamer XCOFF Object File Interface ---===//
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_MCXCOFFSTREAMER_H
10 #define LLVM_MC_MCXCOFFSTREAMER_H
11 
12 #include "llvm/MC/MCObjectStreamer.h"
13 
14 namespace llvm {
15 
16 class MCXCOFFStreamer : public MCObjectStreamer {
17 public:
18   MCXCOFFStreamer(MCContext &Context, std::unique_ptr<MCAsmBackend> MAB,
19                   std::unique_ptr<MCObjectWriter> OW,
20                   std::unique_ptr<MCCodeEmitter> Emitter);
21 
22   bool emitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override;
23   void emitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
24                         Align ByteAlignment) override;
25   void emitZerofill(MCSection *Section, MCSymbol *Symbol = nullptr,
26                     uint64_t Size = 0, Align ByteAlignment = Align(1),
27                     SMLoc Loc = SMLoc()) override;
28   void emitInstToData(const MCInst &Inst, const MCSubtargetInfo &) override;
29   void emitXCOFFLocalCommonSymbol(MCSymbol *LabelSym, uint64_t Size,
30                                   MCSymbol *CsectSym, Align Alignment) override;
31   void emitXCOFFSymbolLinkageWithVisibility(MCSymbol *Symbol,
32                                             MCSymbolAttr Linkage,
33                                             MCSymbolAttr Visibility) override;
34   void emitXCOFFRefDirective(const MCSymbol *Symbol) override;
35   void emitXCOFFRenameDirective(const MCSymbol *Name,
36                                 StringRef Rename) override {
37     report_fatal_error("emitXCOFFRenameDirective is not implemented yet on "
38                        "object generation path");
39   }
40   void emitXCOFFExceptDirective(const MCSymbol *Symbol, const MCSymbol *Trap,
41                                 unsigned Lang, unsigned Reason,
42                                 unsigned FunctionSize, bool hasDebug) override;
43   void emitXCOFFCInfoSym(StringRef Name, StringRef Metadata) override;
44 };
45 
46 } // end namespace llvm
47 
48 #endif // LLVM_MC_MCXCOFFSTREAMER_H
49