#include "llvm/DWARFLinker/Classic/DWARFStreamer.h"
#include "llvm/CodeGen/NonRelocatableStringpool.h"
#include "llvm/DWARFLinker/Classic/DWARFLinkerCompileUnit.h"
#include "llvm/DebugInfo/DWARF/DWARFContext.h"
#include "llvm/DebugInfo/DWARF/DWARFDebugMacro.h"
#include "llvm/MC/MCAsmBackend.h"
#include "llvm/MC/MCCodeEmitter.h"
#include "llvm/MC/MCDwarf.h"
#include "llvm/MC/MCObjectWriter.h"
#include "llvm/MC/MCSection.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/MC/MCTargetOptions.h"
#include "llvm/MC/MCTargetOptionsCommandFlags.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/LEB128.h"
#include "llvm/Target/TargetOptions.h"
#include "llvm/TargetParser/Triple.h"
usingnamespacellvm;
usingnamespacedwarf_linker;
usingnamespacedwarf_linker::classic;
Expected<std::unique_ptr<DwarfStreamer>> DwarfStreamer::createStreamer(
const Triple &TheTriple, DWARFLinkerBase::OutputFileType FileType,
raw_pwrite_stream &OutFile, DWARFLinkerBase::MessageHandlerTy Warning) { … }
Error DwarfStreamer::init(Triple TheTriple,
StringRef Swift5ReflectionSegmentName) { … }
void DwarfStreamer::finish() { … }
void DwarfStreamer::switchToDebugInfoSection(unsigned DwarfVersion) { … }
void DwarfStreamer::emitCompileUnitHeader(CompileUnit &Unit,
unsigned DwarfVersion) { … }
void DwarfStreamer::emitAbbrevs(
const std::vector<std::unique_ptr<DIEAbbrev>> &Abbrevs,
unsigned DwarfVersion) { … }
void DwarfStreamer::emitDIE(DIE &Die) { … }
void DwarfStreamer::emitSectionContents(StringRef SecData,
DebugSectionKind SecKind) { … }
MCSection *DwarfStreamer::getMCSection(DebugSectionKind SecKind) { … }
void DwarfStreamer::emitStrings(const NonRelocatableStringpool &Pool) { … }
void DwarfStreamer::emitStringOffsets(
const SmallVector<uint64_t> &StringOffsets, uint16_t TargetDWARFVersion) { … }
void DwarfStreamer::emitLineStrings(const NonRelocatableStringpool &Pool) { … }
void DwarfStreamer::emitDebugNames(DWARF5AccelTable &Table) { … }
void DwarfStreamer::emitAppleNamespaces(
AccelTable<AppleAccelTableStaticOffsetData> &Table) { … }
void DwarfStreamer::emitAppleNames(
AccelTable<AppleAccelTableStaticOffsetData> &Table) { … }
void DwarfStreamer::emitAppleObjc(
AccelTable<AppleAccelTableStaticOffsetData> &Table) { … }
void DwarfStreamer::emitAppleTypes(
AccelTable<AppleAccelTableStaticTypeData> &Table) { … }
void DwarfStreamer::emitSwiftAST(StringRef Buffer) { … }
void DwarfStreamer::emitSwiftReflectionSection(
llvm::binaryformat::Swift5ReflectionSectionKind ReflSectionKind,
StringRef Buffer, uint32_t Alignment, uint32_t Size) { … }
void DwarfStreamer::emitDwarfDebugArangesTable(
const CompileUnit &Unit, const AddressRanges &LinkedRanges) { … }
void DwarfStreamer::emitDwarfDebugRangesTableFragment(
const CompileUnit &Unit, const AddressRanges &LinkedRanges,
PatchLocation Patch) { … }
MCSymbol *
DwarfStreamer::emitDwarfDebugRangeListHeader(const CompileUnit &Unit) { … }
void DwarfStreamer::emitDwarfDebugRangeListFragment(
const CompileUnit &Unit, const AddressRanges &LinkedRanges,
PatchLocation Patch, DebugDieValuePool &AddrPool) { … }
void DwarfStreamer::emitDwarfDebugRangeListFooter(const CompileUnit &Unit,
MCSymbol *EndLabel) { … }
void DwarfStreamer::emitDwarfDebugRngListsTableFragment(
const CompileUnit &Unit, const AddressRanges &LinkedRanges,
PatchLocation Patch, DebugDieValuePool &AddrPool) { … }
MCSymbol *DwarfStreamer::emitDwarfDebugLocListHeader(const CompileUnit &Unit) { … }
void DwarfStreamer::emitDwarfDebugLocListFragment(
const CompileUnit &Unit,
const DWARFLocationExpressionsVector &LinkedLocationExpression,
PatchLocation Patch, DebugDieValuePool &AddrPool) { … }
void DwarfStreamer::emitDwarfDebugLocListFooter(const CompileUnit &Unit,
MCSymbol *EndLabel) { … }
void DwarfStreamer::emitDwarfDebugLocTableFragment(
const CompileUnit &Unit,
const DWARFLocationExpressionsVector &LinkedLocationExpression,
PatchLocation Patch) { … }
MCSymbol *DwarfStreamer::emitDwarfDebugAddrsHeader(const CompileUnit &Unit) { … }
void DwarfStreamer::emitDwarfDebugAddrs(const SmallVector<uint64_t> &Addrs,
uint8_t AddrSize) { … }
void DwarfStreamer::emitDwarfDebugAddrsFooter(const CompileUnit &Unit,
MCSymbol *EndLabel) { … }
void DwarfStreamer::emitDwarfDebugLocListsTableFragment(
const CompileUnit &Unit,
const DWARFLocationExpressionsVector &LinkedLocationExpression,
PatchLocation Patch, DebugDieValuePool &AddrPool) { … }
void DwarfStreamer::emitLineTableForUnit(
const DWARFDebugLine::LineTable &LineTable, const CompileUnit &Unit,
OffsetsStringPool &DebugStrPool, OffsetsStringPool &DebugLineStrPool) { … }
void DwarfStreamer::emitLineTablePrologue(const DWARFDebugLine::Prologue &P,
OffsetsStringPool &DebugStrPool,
OffsetsStringPool &DebugLineStrPool) { … }
void DwarfStreamer::emitLineTablePrologueV2IncludeAndFileTable(
const DWARFDebugLine::Prologue &P, OffsetsStringPool &DebugStrPool,
OffsetsStringPool &DebugLineStrPool) { … }
void DwarfStreamer::emitLineTablePrologueV5IncludeAndFileTable(
const DWARFDebugLine::Prologue &P, OffsetsStringPool &DebugStrPool,
OffsetsStringPool &DebugLineStrPool) { … }
void DwarfStreamer::emitLineTableString(const DWARFDebugLine::Prologue &P,
const DWARFFormValue &String,
OffsetsStringPool &DebugStrPool,
OffsetsStringPool &DebugLineStrPool) { … }
void DwarfStreamer::emitLineTableProloguePayload(
const DWARFDebugLine::Prologue &P, OffsetsStringPool &DebugStrPool,
OffsetsStringPool &DebugLineStrPool) { … }
void DwarfStreamer::emitLineTableRows(
const DWARFDebugLine::LineTable &LineTable, MCSymbol *LineEndSym,
unsigned AddressByteSize) { … }
void DwarfStreamer::emitIntOffset(uint64_t Offset, dwarf::DwarfFormat Format,
uint64_t &SectionSize) { … }
void DwarfStreamer::emitLabelDifference(const MCSymbol *Hi, const MCSymbol *Lo,
dwarf::DwarfFormat Format,
uint64_t &SectionSize) { … }
void DwarfStreamer::emitPubSectionForUnit(
MCSection *Sec, StringRef SecName, const CompileUnit &Unit,
const std::vector<CompileUnit::AccelInfo> &Names) { … }
void DwarfStreamer::emitPubNamesForUnit(const CompileUnit &Unit) { … }
void DwarfStreamer::emitPubTypesForUnit(const CompileUnit &Unit) { … }
void DwarfStreamer::emitCIE(StringRef CIEBytes) { … }
void DwarfStreamer::emitFDE(uint32_t CIEOffset, uint32_t AddrSize,
uint64_t Address, StringRef FDEBytes) { … }
void DwarfStreamer::emitMacroTables(DWARFContext *Context,
const Offset2UnitMap &UnitMacroMap,
OffsetsStringPool &StringPool) { … }
void DwarfStreamer::emitMacroTableImpl(const DWARFDebugMacro *MacroTable,
const Offset2UnitMap &UnitMacroMap,
OffsetsStringPool &StringPool,
uint64_t &OutOffset) { … }