1 //===- MCWinCOFFStreamer.h - COFF Object File Interface ---------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_MC_MCWINCOFFSTREAMER_H
11 #define LLVM_MC_MCWINCOFFSTREAMER_H
13 #include "llvm/MC/MCDirectives.h"
14 #include "llvm/MC/MCObjectStreamer.h"
23 class MCSubtargetInfo;
27 class raw_pwrite_stream;
29 class MCWinCOFFStreamer : public MCObjectStreamer {
31 MCWinCOFFStreamer(MCContext &Context, MCAsmBackend &MAB, MCCodeEmitter &CE,
32 raw_pwrite_stream &OS);
35 void reset() override {
37 MCObjectStreamer::reset();
40 /// \name MCStreamer interface
43 void InitSections(bool NoExecStack) override;
44 void EmitLabel(MCSymbol *Symbol) override;
45 void EmitAssemblerFlag(MCAssemblerFlag Flag) override;
46 void EmitThumbFunc(MCSymbol *Func) override;
47 bool EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override;
48 void EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) override;
49 void BeginCOFFSymbolDef(MCSymbol const *Symbol) override;
50 void EmitCOFFSymbolStorageClass(int StorageClass) override;
51 void EmitCOFFSymbolType(int Type) override;
52 void EndCOFFSymbolDef() override;
53 void EmitCOFFSafeSEH(MCSymbol const *Symbol) override;
54 void EmitCOFFSectionIndex(MCSymbol const *Symbol) override;
55 void EmitCOFFSecRel32(MCSymbol const *Symbol) override;
56 void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
57 unsigned ByteAlignment) override;
58 void EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size,
59 unsigned ByteAlignment) override;
60 void EmitZerofill(MCSection *Section, MCSymbol *Symbol, uint64_t Size,
61 unsigned ByteAlignment) override;
62 void EmitTBSSSymbol(MCSection *Section, MCSymbol *Symbol, uint64_t Size,
63 unsigned ByteAlignment) override;
64 void EmitFileDirective(StringRef Filename) override;
65 void EmitIdent(StringRef IdentString) override;
66 void EmitWinEHHandlerData() override;
67 void FinishImpl() override;
72 const MCSymbol *CurSymbol;
73 void EmitInstToData(const MCInst &Inst, const MCSubtargetInfo &STI) override;
76 LLVM_ATTRIBUTE_NORETURN void FatalError(const Twine &Msg) const;