Manages per‐section constant pools used by the assembler ldr‐pseudo.

Synopsis

Declared in <llvm/MC/ConstantPools.h>

class AssemblerConstantPools;

Description

The map associates a section to its constant pool. The constant pool is a vector of (label, value) pairs. When the ldr pseudo is parsed we insert a new (label, value) pair into the constant pool for the current section and add an MCSymbolRefExpr to the new label as an opcode to the ldr. After we have parsed all the user input we output the (label, value) pairs in each constant pool at the end of the section.

We use MapVector for the map type to ensure stable iteration of the sections at the end of the parse. We need to iterate over the sections in a stable order to ensure that we print the constant pools in a deterministic order when printing an assembly file.

Member Functions

Name

Description

addEntry

Add Expr to the constant pool for the streamer's current section.

clearCacheForCurrentSection

Clear the entry cache for the streamer's current section.

emitAll

Emit every section's constant pool using Streamer.

emitForCurrentSection

Emit the constant pool for the streamer's current section.

Created with MrDocs