22 Pool.insert(std::make_pair(
Sym, AddressPoolEntry(Pool.size(), TLS)));
23 return IterBool.first->second.Number;
27 static const uint8_t AddrSize = Asm.MAI->getCodePointerSize();
30 Asm.emitDwarfUnitLength(
"debug_addr",
"Length of contribution");
31 Asm.OutStreamer->AddComment(
"DWARF version number");
32 Asm.emitInt16(Asm.getDwarfVersion());
33 Asm.OutStreamer->AddComment(
"Address size");
34 Asm.emitInt8(AddrSize);
35 Asm.OutStreamer->AddComment(
"Segment selector size");
47 Asm.OutStreamer->switchSection(AddrSection);
51 if (Asm.getDwarfVersion() >= 5)
52 EndLabel = emitHeader(Asm, AddrSection);
56 Asm.OutStreamer->emitLabel(AddressTableBaseSym);
61 for (
const auto &
I : Pool)
62 Entries[
I.second.Number] =
64 ? Asm.getObjFileLowering().getDebugThreadLocalSymbol(
I.first)
67 for (
const MCExpr *Entry : Entries)
68 Asm.OutStreamer->emitValue(Entry, Asm.MAI->getCodePointerSize());
71 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.