34 Streamer.
EmitValue(Entry.Value, Entry.Size, Entry.Loc);
45 auto Itr = C ? CachedEntries.find(C->
getValue()) : CachedEntries.end();
46 if (Itr != CachedEntries.end())
54 CachedEntries[C->
getValue()] = SymRef;
61 CachedEntries.clear();
68 ConstantPoolMapTy::iterator
CP = ConstantPools.find(Section);
69 if (CP == ConstantPools.end())
76 AssemblerConstantPools::getOrCreateConstantPool(
MCSection *Section) {
90 for (
auto &CPI : ConstantPools) {
114 return getOrCreateConstantPool(Section).addEntry(Expr, Streamer.
getContext(),
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)
This class represents lattice values for constants.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
void push_back(const T &Elt)
MCContext & getContext() const
Base class for the full range of assembler expressions which are needed for parsing.
Context object for machine code objects.
const MCExpr * addEntry(const MCExpr *Value, MCContext &Context, unsigned Size, SMLoc Loc)
void EmitValue(const MCExpr *Value, unsigned Size, SMLoc Loc=SMLoc())
Streaming machine code generation interface.
MCSymbol * createTempSymbol(bool CanBeUnnamed=true)
Create and return a new assembler temporary symbol with a unique but unspecified name.
virtual void SwitchSection(MCSection *Section, const MCExpr *Subsection=nullptr)
Set the current section where code is being emitted to Section.
void emitForCurrentSection(MCStreamer &Streamer)
const MCExpr * addEntry(MCStreamer &Streamer, const MCExpr *Expr, unsigned Size, SMLoc Loc)
virtual void EmitDataRegion(MCDataRegionType Kind)
Note in the output the specified region Kind.
void emitAll(MCStreamer &Streamer)
static void emitConstantPool(MCStreamer &Streamer, MCSection *Section, ConstantPool &CP)
virtual void EmitCodeAlignment(unsigned ByteAlignment, unsigned MaxBytesToEmit=0)
Emit nops until the byte alignment ByteAlignment is reached.
void emitEntries(MCStreamer &Streamer)
MCSection * getCurrentSectionOnly() const
LLVM_NODISCARD bool empty() const
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
LLVM Value Representation.
virtual void EmitLabel(MCSymbol *Symbol, SMLoc Loc=SMLoc())
Emit a label for Symbol into the current section.
void clearCacheForCurrentSection(MCStreamer &Streamer)
Represents a location in source code.