21 auto IterBool = Pool.try_emplace(Sym, Pool.size(), TLS);
22 return IterBool.first->second.Number;
26 static const uint8_t AddrSize = Asm.MAI->getCodePointerSize();
29 Asm.emitDwarfUnitLength(
"debug_addr",
"Length of contribution");
30 Asm.OutStreamer->AddComment(
"DWARF version number");
31 Asm.emitInt16(Asm.getDwarfVersion());
32 Asm.OutStreamer->AddComment(
"Address size");
33 Asm.emitInt8(AddrSize);
34 Asm.OutStreamer->AddComment(
"Segment selector size");
46 Asm.OutStreamer->switchSection(AddrSection);
50 if (Asm.getDwarfVersion() >= 5)
51 EndLabel = emitHeader(Asm, AddrSection);
55 Asm.OutStreamer->emitLabel(AddressTableBaseSym);
60 for (
const auto &
I : Pool)
61 Entries[
I.second.Number] =
63 ? Asm.getObjFileLowering().getDebugThreadLocalSymbol(
I.first)
66 for (
const MCExpr *Entry : Entries)
67 Asm.OutStreamer->emitValue(Entry, Asm.MAI->getCodePointerSize());
70 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, SMLoc Loc=SMLoc())
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.