Changeset View
Changeset View
Standalone View
Standalone View
llvm/include/llvm/MC/MCContext.h
Show First 20 Lines • Show All 150 Lines • ▼ Show 20 Lines | private: | ||||
DenseMap<std::pair<unsigned, unsigned>, MCSymbol *> LocalSymbols; | DenseMap<std::pair<unsigned, unsigned>, MCSymbol *> LocalSymbols; | ||||
/// Keeps tracks of names that were used both for used declared and | /// Keeps tracks of names that were used both for used declared and | ||||
/// artificial symbols. The value is "true" if the name has been used for a | /// artificial symbols. The value is "true" if the name has been used for a | ||||
/// non-section symbol (there can be at most one of those, plus an unlimited | /// non-section symbol (there can be at most one of those, plus an unlimited | ||||
/// number of section symbols with the same name). | /// number of section symbols with the same name). | ||||
StringMap<bool, BumpPtrAllocator &> UsedNames; | StringMap<bool, BumpPtrAllocator &> UsedNames; | ||||
/// Keeps track of labels that are used in inline assembly. | |||||
SymbolTable InlineAsmUsedLabelNames; | |||||
/// The next ID to dole out to an unnamed assembler temporary symbol with | /// The next ID to dole out to an unnamed assembler temporary symbol with | ||||
/// a given prefix. | /// a given prefix. | ||||
StringMap<unsigned> NextID; | StringMap<unsigned> NextID; | ||||
/// Instances of directional local labels. | /// Instances of directional local labels. | ||||
DenseMap<unsigned, MCLabel *> Instances; | DenseMap<unsigned, MCLabel *> Instances; | ||||
/// NextInstance() creates the next instance of the directional local label | /// NextInstance() creates the next instance of the directional local label | ||||
/// for the LocalLabelVal and adds it to the map if needed. | /// for the LocalLabelVal and adds it to the map if needed. | ||||
▲ Show 20 Lines • Show All 349 Lines • ▼ Show 20 Lines | public: | ||||
void setSymbolValue(MCStreamer &Streamer, StringRef Sym, uint64_t Val); | void setSymbolValue(MCStreamer &Streamer, StringRef Sym, uint64_t Val); | ||||
/// getSymbols - Get a reference for the symbol table for clients that | /// getSymbols - Get a reference for the symbol table for clients that | ||||
/// want to, for example, iterate over all symbols. 'const' because we | /// want to, for example, iterate over all symbols. 'const' because we | ||||
/// still want any modifications to the table itself to use the MCContext | /// still want any modifications to the table itself to use the MCContext | ||||
/// APIs. | /// APIs. | ||||
const SymbolTable &getSymbols() const { return Symbols; } | const SymbolTable &getSymbols() const { return Symbols; } | ||||
/// isInlineAsmLabel - Return true if the name is a label referenced in | |||||
/// inline assembly. | |||||
MCSymbol *getInlineAsmLabel(StringRef Name) const { | |||||
return InlineAsmUsedLabelNames.lookup(Name); | |||||
} | |||||
/// registerInlineAsmLabel - Records that the name is a label referenced in | |||||
/// inline assembly. | |||||
void registerInlineAsmLabel(MCSymbol *Sym); | |||||
/// @} | /// @} | ||||
/// \name Section Management | /// \name Section Management | ||||
/// @{ | /// @{ | ||||
enum : unsigned { | enum : unsigned { | ||||
/// Pass this value as the UniqueID during section creation to get the | /// Pass this value as the UniqueID during section creation to get the | ||||
/// generic section with the given name and characteristics. The usual | /// generic section with the given name and characteristics. The usual | ||||
▲ Show 20 Lines • Show All 395 Lines • Show Last 20 Lines |