#include "llvm/MC/MCWinCOFFStreamer.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Twine.h"
#include "llvm/BinaryFormat/COFF.h"
#include "llvm/MC/MCAsmBackend.h"
#include "llvm/MC/MCAssembler.h"
#include "llvm/MC/MCCodeEmitter.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCFixup.h"
#include "llvm/MC/MCFragment.h"
#include "llvm/MC/MCObjectFileInfo.h"
#include "llvm/MC/MCObjectStreamer.h"
#include "llvm/MC/MCObjectWriter.h"
#include "llvm/MC/MCSectionCOFF.h"
#include "llvm/MC/MCSymbolCOFF.h"
#include "llvm/MC/MCTargetOptions.h"
#include "llvm/MC/MCWinCOFFObjectWriter.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/SMLoc.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TargetParser/Triple.h"
#include <algorithm>
#include <cstdint>
usingnamespacellvm;
#define DEBUG_TYPE …
MCWinCOFFStreamer::MCWinCOFFStreamer(MCContext &Context,
std::unique_ptr<MCAsmBackend> MAB,
std::unique_ptr<MCCodeEmitter> CE,
std::unique_ptr<MCObjectWriter> OW)
: … { … }
WinCOFFObjectWriter &MCWinCOFFStreamer::getWriter() { … }
void MCWinCOFFStreamer::emitInstToData(const MCInst &Inst,
const MCSubtargetInfo &STI) { … }
void MCWinCOFFStreamer::initSections(bool NoExecStack,
const MCSubtargetInfo &STI) { … }
void MCWinCOFFStreamer::changeSection(MCSection *Section, uint32_t Subsection) { … }
void MCWinCOFFStreamer::emitLabel(MCSymbol *S, SMLoc Loc) { … }
void MCWinCOFFStreamer::emitAssemblerFlag(MCAssemblerFlag Flag) { … }
void MCWinCOFFStreamer::emitThumbFunc(MCSymbol *Func) { … }
bool MCWinCOFFStreamer::emitSymbolAttribute(MCSymbol *S,
MCSymbolAttr Attribute) { … }
void MCWinCOFFStreamer::emitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) { … }
void MCWinCOFFStreamer::beginCOFFSymbolDef(MCSymbol const *S) { … }
void MCWinCOFFStreamer::emitCOFFSymbolStorageClass(int StorageClass) { … }
void MCWinCOFFStreamer::emitCOFFSymbolType(int Type) { … }
void MCWinCOFFStreamer::endCOFFSymbolDef() { … }
void MCWinCOFFStreamer::emitCOFFSafeSEH(MCSymbol const *Symbol) { … }
void MCWinCOFFStreamer::emitCOFFSymbolIndex(MCSymbol const *Symbol) { … }
void MCWinCOFFStreamer::emitCOFFSectionIndex(const MCSymbol *Symbol) { … }
void MCWinCOFFStreamer::emitCOFFSecRel32(const MCSymbol *Symbol,
uint64_t Offset) { … }
void MCWinCOFFStreamer::emitCOFFImgRel32(const MCSymbol *Symbol,
int64_t Offset) { … }
void MCWinCOFFStreamer::emitCommonSymbol(MCSymbol *S, uint64_t Size,
Align ByteAlignment) { … }
void MCWinCOFFStreamer::emitLocalCommonSymbol(MCSymbol *S, uint64_t Size,
Align ByteAlignment) { … }
void MCWinCOFFStreamer::emitWeakReference(MCSymbol *AliasS,
const MCSymbol *Symbol) { … }
void MCWinCOFFStreamer::emitZerofill(MCSection *Section, MCSymbol *Symbol,
uint64_t Size, Align ByteAlignment,
SMLoc Loc) { … }
void MCWinCOFFStreamer::emitTBSSSymbol(MCSection *Section, MCSymbol *Symbol,
uint64_t Size, Align ByteAlignment) { … }
void MCWinCOFFStreamer::emitIdent(StringRef IdentString) { … }
void MCWinCOFFStreamer::emitWinEHHandlerData(SMLoc Loc) { … }
void MCWinCOFFStreamer::emitCGProfileEntry(const MCSymbolRefExpr *From,
const MCSymbolRefExpr *To,
uint64_t Count) { … }
void MCWinCOFFStreamer::finalizeCGProfileEntry(const MCSymbolRefExpr *&SRE) { … }
void MCWinCOFFStreamer::finishImpl() { … }
void MCWinCOFFStreamer::Error(const Twine &Msg) const { … }