33 Streamer.
emitValue(Entry.Value, Entry.Size, Entry.Loc);
46 auto CItr = CachedConstantEntries.find(
C->getValue());
47 if (CItr != CachedConstantEntries.end())
53 auto SItr = CachedSymbolEntries.find(&(S->
getSymbol()));
54 if (SItr != CachedSymbolEntries.end())
63 CachedConstantEntries[
C->getValue()] = SymRef;
65 CachedSymbolEntries[&(S->
getSymbol())] = SymRef;
72 CachedConstantEntries.clear();
73 CachedSymbolEntries.clear();
81 if (CP == ConstantPools.
end())
88AssemblerConstantPools::getOrCreateConstantPool(
MCSection *Section) {
89 return ConstantPools[Section];
96 CP.emitEntries(Streamer);
102 for (
auto &CPI : ConstantPools) {
static void emitConstantPool(MCStreamer &Streamer, MCSection *Section, ConstantPool &CP)
void emitAll(MCStreamer &Streamer)
void clearCacheForCurrentSection(MCStreamer &Streamer)
void emitForCurrentSection(MCStreamer &Streamer)
const MCExpr * addEntry(MCStreamer &Streamer, const MCExpr *Expr, unsigned Size, SMLoc Loc)
const MCExpr * addEntry(const MCExpr *Value, MCContext &Context, unsigned Size, SMLoc Loc)
void emitEntries(MCStreamer &Streamer)
Context object for machine code objects.
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.
Streaming machine code generation interface.
MCContext & getContext() const
void emitValue(const MCExpr *Value, unsigned Size, SMLoc Loc=SMLoc())
virtual void emitLabel(MCSymbol *Symbol, SMLoc Loc=SMLoc())
Emit a label for Symbol into the current section.
virtual void emitValueToAlignment(Align Alignment, int64_t Value=0, unsigned ValueSize=1, unsigned MaxBytesToEmit=0)
Emit some number of copies of Value until the byte alignment ByteAlignment is reached.
virtual void emitDataRegion(MCDataRegionType Kind)
Note in the output the specified region Kind.
virtual void switchSection(MCSection *Section, const MCExpr *Subsection=nullptr)
Set the current section where code is being emitted to Section.
MCSection * getCurrentSectionOnly() const
Represent a reference to a symbol from inside an expression.
const MCSymbol & getSymbol() const
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 ...
typename VectorType::iterator iterator
iterator find(const KeyT &Key)
Represents a location in source code.
void push_back(const T &Elt)
LLVM Value Representation.
@ C
The default llvm calling convention, compatible with C.
This is an optimization pass for GlobalISel generic memory operations.
@ MCDR_DataRegionEnd
.end_data_region
@ MCDR_DataRegion
.data_region
This struct is a compact representation of a valid (non-zero power of two) alignment.