20 auto IterBool = Pool.try_emplace(Sym, Pool.size(), TLS);
21 return IterBool.first->second.Number;
25 static const uint8_t AddrSize = Asm.MAI->getCodePointerSize();
28 Asm.emitDwarfUnitLength(
"debug_addr",
"Length of contribution");
29 Asm.OutStreamer->AddComment(
"DWARF version number");
30 Asm.emitInt16(Asm.getDwarfVersion());
31 Asm.OutStreamer->AddComment(
"Address size");
32 Asm.emitInt8(AddrSize);
33 Asm.OutStreamer->AddComment(
"Segment selector size");
45 Asm.OutStreamer->switchSection(AddrSection);
49 if (Asm.getDwarfVersion() >= 5)
50 EndLabel = emitHeader(Asm, AddrSection);
54 Asm.OutStreamer->emitLabel(AddressTableBaseSym);
59 for (
const auto &
I : Pool)
60 Entries[
I.second.Number] =
62 ? Asm.getObjFileLowering().getDebugThreadLocalSymbol(
I.first)
65 for (
const MCExpr *Entry : Entries)
66 Asm.OutStreamer->emitValue(Entry, Asm.MAI->getCodePointerSize());
69 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.