23 Pool.insert(std::make_pair(
Sym, AddressPoolEntry(Pool.size(), TLS)));
24 return IterBool.first->second.Number;
28 static const uint8_t AddrSize = Asm.MAI->getCodePointerSize();
31 Asm.emitDwarfUnitLength(
"debug_addr",
"Length of contribution");
32 Asm.OutStreamer->AddComment(
"DWARF version number");
33 Asm.emitInt16(Asm.getDwarfVersion());
34 Asm.OutStreamer->AddComment(
"Address size");
35 Asm.emitInt8(AddrSize);
36 Asm.OutStreamer->AddComment(
"Segment selector size");
48 Asm.OutStreamer->switchSection(AddrSection);
52 if (Asm.getDwarfVersion() >= 5)
53 EndLabel = emitHeader(Asm, AddrSection);
57 Asm.OutStreamer->emitLabel(AddressTableBaseSym);
62 for (
const auto &
I : Pool)
63 Entries[
I.second.Number] =
65 ? Asm.getObjFileLowering().getDebugThreadLocalSymbol(
I.first)
68 for (
const MCExpr *Entry : Entries)
69 Asm.OutStreamer->emitValue(Entry, Asm.MAI->getCodePointerSize());
72 Asm.OutStreamer->emitLabel(EndLabel);
This file defines the SmallVector class.
unsigned getIndex(const MCSymbol *Sym, bool TLS=false)
Returns the index into the address pool with the given label/symbol.
void emit(AsmPrinter &Asm, MCSection *AddrSection)
void resetUsedFlag(bool HasBeenUsed=false)
This class is intended to be used as a driving class for all asm writers.
Base class for the full range of assembler expressions which are needed for parsing.
Instances of this class represent a uniqued identifier for a section in the current translation unit.
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx)
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
This is an optimization pass for GlobalISel generic memory operations.