class MCContext

Declaration

class MCContext { /* full declaration omitted */ };

Description

Context object for machine code objects. This class owns all of the sections that it creates.

Declared at: llvm/include/llvm/MC/MCContext.h:76

Member Variables

private llvm::MCContext::Environment Env
private llvm::StringRef Swift5ReflectionSegmentName
The name of the Segment where Swift5 Reflection Section data will be outputted
private llvm::Triple TT
The triple for this object.
private const llvm::SourceMgr* SrcMgr
The SourceMgr for this object, if any.
private std::unique_ptr<SourceMgr> InlineSrcMgr
The SourceMgr for inline assembly, if any.
private std::vector<const MDNode*> LocInfos
private llvm::MCContext::DiagHandlerTy DiagHandler
private const llvm::MCAsmInfo* MAI
The MCAsmInfo for this target.
private const llvm::MCRegisterInfo* MRI
The MCRegisterInfo for this target.
private const llvm::MCObjectFileInfo* MOFI
The MCObjectFileInfo for this target.
private const llvm::MCSubtargetInfo* MSTI
The MCSubtargetInfo for this target.
private std::unique_ptr<CodeViewContext> CVContext
private llvm::BumpPtrAllocator Allocator
We use a bump pointer allocator to avoid the need to track all allocated objects.
private SpecificBumpPtrAllocator<llvm::MCSectionCOFF> COFFAllocator
private SpecificBumpPtrAllocator< llvm::MCSectionDXContainer> DXCAllocator
private SpecificBumpPtrAllocator<llvm::MCSectionELF> ELFAllocator
private SpecificBumpPtrAllocator<llvm::MCSectionMachO> MachOAllocator
private SpecificBumpPtrAllocator<llvm::MCSectionGOFF> GOFFAllocator
private SpecificBumpPtrAllocator<llvm::MCSectionSPIRV> SPIRVAllocator
private SpecificBumpPtrAllocator<llvm::MCSectionWasm> WasmAllocator
private SpecificBumpPtrAllocator<llvm::MCSectionXCOFF> XCOFFAllocator
private SpecificBumpPtrAllocator<llvm::MCInst> MCInstAllocator
private llvm::MCContext::SymbolTable Symbols
Bindings of names to symbols.
private DenseMap<std::pair<unsigned int, unsigned int>, llvm::MCSymbol*> LocalSymbols
A mapping from a local label number and an instance count to a symbol. For example, in the assembly 1: 2: 1: We have three labels represented by the pairs (1, 0), (2, 0) and (1, 1)
private StringMap<bool, llvm::BumpPtrAllocator&> UsedNames
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 non-section symbol (there can be at most one of those, plus an unlimited number of section symbols with the same name).
private llvm::MCContext::SymbolTable InlineAsmUsedLabelNames
Keeps track of labels that are used in inline assembly.
private StringMap<unsigned int> NextID
The next ID to dole out to an unnamed assembler temporary symbol with a given prefix.
private DenseMap<unsigned int, llvm::MCLabel*> Instances
Instances of directional local labels.
private uint8_t BBAddrMapVersion = 1
LLVM_BB_ADDR_MAP version to emit.
private char* SecureLogFile
The file name of the log file from the environment variable AS_SECURE_LOG_FILE. Which must be set before the .secure_log_unique directive is used or it is an error.
private std::unique_ptr<raw_fd_ostream> SecureLog
The stream that gets written to for the .secure_log_unique directive.
private bool SecureLogUsed = false
Boolean toggled when .secure_log_unique / .secure_log_reset is seen to catch errors if .secure_log_unique appears twice without .secure_log_reset appearing between them.
private SmallString<128> CompilationDir
The compilation directory to use for DW_AT_comp_dir.
private std::map<std::string, const std::string, std::greater<std::string>> DebugPrefixMap
Prefix replacement map for source file information.
private std::string MainFileName
The main file name if passed in explicitly.
private std::map<unsigned int, MCDwarfLineTable> MCDwarfLineTablesCUMap
The dwarf file and directory tables from the dwarf .file directive. We now emit a line table for each compile unit. To reduce the prologue size of each line table, the files and directories used by each compile unit are separated.
private llvm::MCDwarfLoc CurrentDwarfLoc
The current dwarf line information from the last dwarf .loc directive.
private bool DwarfLocSeen = false
private bool GenDwarfForAssembly = false
Generate dwarf debugging info for assembly source files.
private unsigned int GenDwarfFileNumber = 0
The current dwarf file number when generate dwarf debugging info for assembly source files.
private SetVector<llvm::MCSection*> SectionsForRanges
Sections for generating the .debug_ranges and .debug_aranges sections.
private std::vector<MCGenDwarfLabelEntry> MCGenDwarfLabelEntries
The information gathered from labels that will have dwarf label entries when generating dwarf assembly source files.
private llvm::StringRef DwarfDebugFlags
The string to embed in the debug information for the compile unit, if non-empty.
private llvm::StringRef DwarfDebugProducer
The string to embed in as the dwarf AT_producer for the compile unit, if non-empty.
private uint16_t DwarfVersion = 4
The maximum version of dwarf that we should emit.
private dwarf::DwarfFormat DwarfFormat = dwarf::DWARF32
The format of dwarf that we emit.
private bool AllowTemporaryLabels = true
Honor temporary labels, this is useful for debugging semantic differences between temporary and non-temporary labels (primarily on Darwin).
private bool UseNamesOnTempLabels = false
private unsigned int DwarfCompileUnitID = 0
The Compile Unit ID that we are currently processing.
private llvm::MCPseudoProbeTable PseudoProbeTable
A collection of MCPseudoProbe in the current module
private StringMap<llvm::MCSectionMachO*> MachOUniquingMap
private std::map<ELFSectionKey, MCSectionELF*> ELFUniquingMap
private std::map<COFFSectionKey, MCSectionCOFF*> COFFUniquingMap
private std::map<std::string, MCSectionGOFF*> GOFFUniquingMap
private std::map<WasmSectionKey, MCSectionWasm*> WasmUniquingMap
private std::map<XCOFFSectionKey, MCSectionXCOFF*> XCOFFUniquingMap
private StringMap<llvm::MCSectionDXContainer*> DXCUniquingMap
private StringMap<bool> RelSecNames
private SpecificBumpPtrAllocator<llvm::MCSubtargetInfo> MCSubtargetAllocator
private bool AutoReset
Do automatic reset in destructor
private const llvm::MCTargetOptions* TargetOptions
private bool HadError = false
private StringMap<llvm::MCAsmMacro> MacroMap
Map of currently defined macros.
private std::map<ELFEntrySizeKey, unsigned int> ELFEntrySizeMap
private DenseSet<llvm::StringRef> ELFSeenGenericMergeableSections

Method Overview

Methods

unsigned int GetInstance(
    unsigned int LocalLabelVal)

Description

GetInstance() gets the current instance of the directional local label for the LocalLabelVal and adds it to the map if needed.

Declared at: llvm/include/llvm/MC/MCContext.h:173

Parameters

unsigned int LocalLabelVal

MCContext(const llvm::MCContext&)

Declared at: llvm/include/llvm/MC/MCContext.h:426

Parameters

const llvm::MCContext&

MCContext(
    const llvm::Triple& TheTriple,
    const llvm::MCAsmInfo* MAI,
    const llvm::MCRegisterInfo* MRI,
    const llvm::MCSubtargetInfo* MSTI,
    const llvm::SourceMgr* Mgr = nullptr,
    const llvm::MCTargetOptions* TargetOpts =
        nullptr,
    bool DoAutoReset = true,
    llvm::StringRef Swift5ReflSegmentName = {})

Declared at: llvm/include/llvm/MC/MCContext.h:420

Parameters

const llvm::Triple& TheTriple
const llvm::MCAsmInfo* MAI
const llvm::MCRegisterInfo* MRI
const llvm::MCSubtargetInfo* MSTI
const llvm::SourceMgr* Mgr = nullptr
const llvm::MCTargetOptions* TargetOpts = nullptr
bool DoAutoReset = true
llvm::StringRef Swift5ReflSegmentName = {}

unsigned int NextInstance(
    unsigned int LocalLabelVal)

Description

NextInstance() creates the next instance of the directional local label for the LocalLabelVal and adds it to the map if needed.

Declared at: llvm/include/llvm/MC/MCContext.h:170

Parameters

unsigned int LocalLabelVal

void RemapDebugPaths()

Declared at: llvm/include/llvm/MC/MCContext.h:706

void addDebugPrefixMapEntry(
    const std::string& From,
    const std::string& To)

Description

Add an entry to the debug prefix map.

Declared at: llvm/include/llvm/MC/MCContext.h:700

Parameters

const std::string& From
const std::string& To

bool addGenDwarfSection(llvm::MCSection* Sec)

Declared at: llvm/include/llvm/MC/MCContext.h:803

Parameters

llvm::MCSection* Sec

void addMCGenDwarfLabelEntry(
    const llvm::MCGenDwarfLabelEntry& E)

Declared at: llvm/include/llvm/MC/MCContext.h:813

Parameters

const llvm::MCGenDwarfLabelEntry& E

void* allocate(unsigned int Size,
               unsigned int Align = 8)

Declared at: llvm/include/llvm/MC/MCContext.h:841

Parameters

unsigned int Size
unsigned int Align = 8

void clearDwarfLocSeen()

Declared at: llvm/include/llvm/MC/MCContext.h:781

llvm::MCSymbol* createDirectionalLocalSymbol(
    unsigned int LocalLabelVal)

Description

Create the definition of a directional local symbol for numbered label (used for "1:" definitions).

Declared at: llvm/include/llvm/MC/MCContext.h:494

Parameters

unsigned int LocalLabelVal

llvm::MCSectionELF* createELFGroupSection(
    const llvm::MCSymbolELF* Group,
    bool IsComdat)

Declared at: llvm/include/llvm/MC/MCContext.h:607

Parameters

const llvm::MCSymbolELF* Group
bool IsComdat

llvm::MCSectionELF* createELFRelSection(
    const llvm::Twine& Name,
    unsigned int Type,
    unsigned int Flags,
    unsigned int EntrySize,
    const llvm::MCSymbolELF* Group,
    const llvm::MCSectionELF* RelInfoSection)

Declared at: llvm/include/llvm/MC/MCContext.h:602

Parameters

const llvm::Twine& Name
unsigned int Type
unsigned int Flags
unsigned int EntrySize
const llvm::MCSymbolELF* Group
const llvm::MCSectionELF* RelInfoSection

llvm::MCSectionELF* createELFSectionImpl(
    llvm::StringRef Section,
    unsigned int Type,
    unsigned int Flags,
    llvm::SectionKind K,
    unsigned int EntrySize,
    const llvm::MCSymbolELF* Group,
    bool IsComdat,
    unsigned int UniqueID,
    const llvm::MCSymbolELF* LinkedToSym)

Declared at: llvm/include/llvm/MC/MCContext.h:375

Parameters

llvm::StringRef Section
unsigned int Type
unsigned int Flags
llvm::SectionKind K
unsigned int EntrySize
const llvm::MCSymbolELF* Group
bool IsComdat
unsigned int UniqueID
const llvm::MCSymbolELF* LinkedToSym

llvm::MCSymbol* createLinkerPrivateTempSymbol()

Description

Create and return a new linker temporary symbol with a unique but unspecified name.

Declared at: llvm/include/llvm/MC/MCContext.h:479

llvm::MCInst* createMCInst()

Description

Create and return a new MC instruction.

Declared at: llvm/include/llvm/MC/MCContext.h:472

llvm::MCSymbol* createNamedTempSymbol(
    const llvm::Twine& Name)

Declared at: llvm/include/llvm/MC/MCContext.h:490

Parameters

const llvm::Twine& Name

llvm::MCSymbol* createNamedTempSymbol()

Description

Create a temporary symbol with a unique name whose name cannot be omitted in the symbol table. This is rarely used.

Declared at: llvm/include/llvm/MC/MCContext.h:489

llvm::MCSymbol* createSymbol(llvm::StringRef Name,
                             bool AlwaysAddSuffix,
                             bool IsTemporary)

Declared at: llvm/include/llvm/MC/MCContext.h:369

Parameters

llvm::StringRef Name
bool AlwaysAddSuffix
bool IsTemporary

llvm::MCSymbol* createSymbolImpl(
    const StringMapEntry<bool>* Name,
    bool CanBeUnnamed)

Declared at: llvm/include/llvm/MC/MCContext.h:367

Parameters

const StringMapEntry<bool>* Name
bool CanBeUnnamed

llvm::MCSymbol* createTempSymbol()

Description

Create a temporary symbol with a unique name. The name will be omitted in the symbol table if UseNamesOnTempLabels is false (default except MCAsmStreamer). The overload without Name uses an unspecified name.

Declared at: llvm/include/llvm/MC/MCContext.h:484

llvm::MCSymbol* createTempSymbol(
    const llvm::Twine& Name,
    bool AlwaysAddSuffix = true)

Declared at: llvm/include/llvm/MC/MCContext.h:485

Parameters

const llvm::Twine& Name
bool AlwaysAddSuffix = true

llvm::MCSymbolXCOFF* createXCOFFSymbolImpl(
    const StringMapEntry<bool>* Name,
    bool IsTemporary)

Declared at: llvm/include/llvm/MC/MCContext.h:382

Parameters

const StringMapEntry<bool>* Name
bool IsTemporary

void deallocate(void* Ptr)

Declared at: llvm/include/llvm/MC/MCContext.h:845

Parameters

void* Ptr

void defineMacro(llvm::StringRef Name,
                 llvm::MCAsmMacro Macro)

Declared at: llvm/include/llvm/MC/MCContext.h:857

Parameters

llvm::StringRef Name
llvm::MCAsmMacro Macro

void diagnose(const llvm::SMDiagnostic& SMD)

Declared at: llvm/include/llvm/MC/MCContext.h:848

Parameters

const llvm::SMDiagnostic& SMD

llvm::EmitDwarfUnwindType emitDwarfUnwindInfo()
    const

Declared at: llvm/include/llvm/MC/MCContext.h:789

void finalizeDwarfSections(llvm::MCStreamer& MCOS)

Declared at: llvm/include/llvm/MC/MCContext.h:807

Parameters

llvm::MCStreamer& MCOS

const llvm::MCAsmInfo* getAsmInfo() const

Declared at: llvm/include/llvm/MC/MCContext.h:447

llvm::MCSectionCOFF* getAssociativeCOFFSection(
    llvm::MCSectionCOFF* Sec,
    const llvm::MCSymbol* KeySym,
    unsigned int UniqueID = GenericSectionID)

Description

Gets or creates a section equivalent to Sec that is associated with the section containing KeySym. For example, to create a debug info section associated with an inline function, pass the normal debug info section as Sec and the function symbol as KeySym.

Declared at: llvm/include/llvm/MC/MCContext.h:640

Parameters

llvm::MCSectionCOFF* Sec
const llvm::MCSymbol* KeySym
unsigned int UniqueID = GenericSectionID

uint8_t getBBAddrMapVersion() const

Declared at: llvm/include/llvm/MC/MCContext.h:684

llvm::MCSectionCOFF* getCOFFSection(
    llvm::StringRef Section,
    unsigned int Characteristics,
    llvm::SectionKind Kind,
    const char* BeginSymName = nullptr)

Declared at: llvm/include/llvm/MC/MCContext.h:631

Parameters

llvm::StringRef Section
unsigned int Characteristics
llvm::SectionKind Kind
const char* BeginSymName = nullptr

llvm::MCSectionCOFF* getCOFFSection(
    llvm::StringRef Section,
    unsigned int Characteristics,
    llvm::SectionKind Kind,
    llvm::StringRef COMDATSymName,
    int Selection,
    unsigned int UniqueID = GenericSectionID,
    const char* BeginSymName = nullptr)

Declared at: llvm/include/llvm/MC/MCContext.h:625

Parameters

llvm::StringRef Section
unsigned int Characteristics
llvm::SectionKind Kind
llvm::StringRef COMDATSymName
int Selection
unsigned int UniqueID = GenericSectionID
const char* BeginSymName = nullptr

llvm::CodeViewContext& getCVContext()

Declared at: llvm/include/llvm/MC/MCContext.h:455

llvm::StringRef getCompilationDir() const

Description

Get the compilation directory for DW_AT_comp_dir The compilation directory should be set with \c setCompilationDir before calling this function. If it is unset, an empty string will be returned.

Declared at: llvm/include/llvm/MC/MCContext.h:694

const llvm::MCDwarfLoc& getCurrentDwarfLoc()

Declared at: llvm/include/llvm/MC/MCContext.h:784

llvm::MCSectionDXContainer* getDXContainerSection(
    llvm::StringRef Section,
    llvm::SectionKind K)

Description

Get the section for the provided Section name

Declared at: llvm/include/llvm/MC/MCContext.h:670

Parameters

llvm::StringRef Section
llvm::SectionKind K

llvm::MCSymbol* getDirectionalLocalSymbol(
    unsigned int LocalLabelVal,
    bool Before)

Description

Create and return a directional local symbol for numbered label (used for "1b" or 1f" references).

Declared at: llvm/include/llvm/MC/MCContext.h:498

Parameters

unsigned int LocalLabelVal
bool Before

unsigned int getDwarfCompileUnitID()

Declared at: llvm/include/llvm/MC/MCContext.h:746

llvm::StringRef getDwarfDebugFlags()

Declared at: llvm/include/llvm/MC/MCContext.h:818

llvm::StringRef getDwarfDebugProducer()

Declared at: llvm/include/llvm/MC/MCContext.h:821

Expected<unsigned int> getDwarfFile(
    llvm::StringRef Directory,
    llvm::StringRef FileName,
    unsigned int FileNumber,
    Optional<MD5::MD5Result> Checksum,
    Optional<llvm::StringRef> Source,
    unsigned int CUID)

Description

Creates an entry in the dwarf file and directory tables.

Declared at: llvm/include/llvm/MC/MCContext.h:717

Parameters

llvm::StringRef Directory
llvm::StringRef FileName
unsigned int FileNumber
Optional<MD5::MD5Result> Checksum
Optional<llvm::StringRef> Source
unsigned int CUID

dwarf::DwarfFormat getDwarfFormat() const

Declared at: llvm/include/llvm/MC/MCContext.h:824

bool getDwarfLocSeen()

Declared at: llvm/include/llvm/MC/MCContext.h:783

uint16_t getDwarfVersion() const

Declared at: llvm/include/llvm/MC/MCContext.h:827

llvm::MCSectionELF* getELFNamedSection(
    const llvm::Twine& Prefix,
    const llvm::Twine& Suffix,
    unsigned int Type,
    unsigned int Flags,
    unsigned int EntrySize = 0)

Description

Get a section with the provided group identifier. This section is named by concatenating \p Prefix with '.' then \p Suffix. The \p Type describes the type of the section and \p Flags are used to further configure this named section.

Declared at: llvm/include/llvm/MC/MCContext.h:598

Parameters

const llvm::Twine& Prefix
const llvm::Twine& Suffix
unsigned int Type
unsigned int Flags
unsigned int EntrySize = 0

llvm::MCSectionELF* getELFSection(
    const llvm::Twine& Section,
    unsigned int Type,
    unsigned int Flags)

Declared at: llvm/include/llvm/MC/MCContext.h:564

Parameters

const llvm::Twine& Section
unsigned int Type
unsigned int Flags

llvm::MCSectionELF* getELFSection(
    const llvm::Twine& Section,
    unsigned int Type,
    unsigned int Flags,
    unsigned int EntrySize)

Declared at: llvm/include/llvm/MC/MCContext.h:569

Parameters

const llvm::Twine& Section
unsigned int Type
unsigned int Flags
unsigned int EntrySize

llvm::MCSectionELF* getELFSection(
    const llvm::Twine& Section,
    unsigned int Type,
    unsigned int Flags,
    unsigned int EntrySize,
    const llvm::Twine& Group,
    bool IsComdat)

Declared at: llvm/include/llvm/MC/MCContext.h:575

Parameters

const llvm::Twine& Section
unsigned int Type
unsigned int Flags
unsigned int EntrySize
const llvm::Twine& Group
bool IsComdat

llvm::MCSectionELF* getELFSection(
    const llvm::Twine& Section,
    unsigned int Type,
    unsigned int Flags,
    unsigned int EntrySize,
    const llvm::Twine& Group,
    bool IsComdat,
    unsigned int UniqueID,
    const llvm::MCSymbolELF* LinkedToSym)

Declared at: llvm/include/llvm/MC/MCContext.h:582

Parameters

const llvm::Twine& Section
unsigned int Type
unsigned int Flags
unsigned int EntrySize
const llvm::Twine& Group
bool IsComdat
unsigned int UniqueID
const llvm::MCSymbolELF* LinkedToSym

llvm::MCSectionELF* getELFSection(
    const llvm::Twine& Section,
    unsigned int Type,
    unsigned int Flags,
    unsigned int EntrySize,
    const llvm::MCSymbolELF* Group,
    bool IsComdat,
    unsigned int UniqueID,
    const llvm::MCSymbolELF* LinkedToSym)

Declared at: llvm/include/llvm/MC/MCContext.h:588

Parameters

const llvm::Twine& Section
unsigned int Type
unsigned int Flags
unsigned int EntrySize
const llvm::MCSymbolELF* Group
bool IsComdat
unsigned int UniqueID
const llvm::MCSymbolELF* LinkedToSym

Optional<unsigned int> getELFUniqueIDForEntsize(
    llvm::StringRef SectionName,
    unsigned int Flags,
    unsigned int EntrySize)

Description

Return the unique ID of the section with the given name, flags and entry size, if it exists.

Declared at: llvm/include/llvm/MC/MCContext.h:618

Parameters

llvm::StringRef SectionName
unsigned int Flags
unsigned int EntrySize

llvm::MCSectionGOFF* getGOFFSection(
    llvm::StringRef Section,
    llvm::SectionKind Kind,
    llvm::MCSection* Parent,
    const llvm::MCExpr* SubsectionId)

Declared at: llvm/include/llvm/MC/MCContext.h:622

Parameters

llvm::StringRef Section
llvm::SectionKind Kind
llvm::MCSection* Parent
const llvm::MCExpr* SubsectionId

unsigned int getGenDwarfFileNumber()

Declared at: llvm/include/llvm/MC/MCContext.h:788

bool getGenDwarfForAssembly()

Declared at: llvm/include/llvm/MC/MCContext.h:786

const SetVector<llvm::MCSection*>&
getGenDwarfSectionSyms()

Declared at: llvm/include/llvm/MC/MCContext.h:799

llvm::MCSymbol* getInlineAsmLabel(
    llvm::StringRef Name) const

Description

isInlineAsmLabel - Return true if the name is a label referenced in inline assembly.

Declared at: llvm/include/llvm/MC/MCContext.h:530

Parameters

llvm::StringRef Name

llvm::SourceMgr* getInlineSourceManager()

Declared at: llvm/include/llvm/MC/MCContext.h:439

std::vector<const MDNode*>& getLocInfos()

Declared at: llvm/include/llvm/MC/MCContext.h:440

const SmallVectorImpl<std::string>&
getMCDwarfDirs(unsigned int CUID = 0)

Declared at: llvm/include/llvm/MC/MCContext.h:742

Parameters

unsigned int CUID = 0

const SmallVectorImpl<llvm::MCDwarfFile>&
getMCDwarfFiles(unsigned int CUID = 0)

Declared at: llvm/include/llvm/MC/MCContext.h:738

Parameters

unsigned int CUID = 0

llvm::MCDwarfLineTable& getMCDwarfLineTable(
    unsigned int CUID)

Declared at: llvm/include/llvm/MC/MCContext.h:728

Parameters

unsigned int CUID

const llvm::MCDwarfLineTable& getMCDwarfLineTable(
    unsigned int CUID) const

Declared at: llvm/include/llvm/MC/MCContext.h:732

Parameters

unsigned int CUID

const std::map<unsigned int, MCDwarfLineTable>&
getMCDwarfLineTables() const

Declared at: llvm/include/llvm/MC/MCContext.h:724

const std::vector<MCGenDwarfLabelEntry>&
getMCGenDwarfLabelEntries() const

Declared at: llvm/include/llvm/MC/MCContext.h:809

llvm::MCPseudoProbeTable& getMCPseudoProbeTable()

Declared at: llvm/include/llvm/MC/MCContext.h:863

llvm::MCSectionMachO* getMachOSection(
    llvm::StringRef Segment,
    llvm::StringRef Section,
    unsigned int TypeAndAttributes,
    unsigned int Reserved2,
    llvm::SectionKind K,
    const char* BeginSymName = nullptr)

Description

Return the MCSection for the specified mach-o section. This requires the operands to be valid.

Declared at: llvm/include/llvm/MC/MCContext.h:552

Parameters

llvm::StringRef Segment
llvm::StringRef Section
unsigned int TypeAndAttributes
unsigned int Reserved2
llvm::SectionKind K
const char* BeginSymName = nullptr

llvm::MCSectionMachO* getMachOSection(
    llvm::StringRef Segment,
    llvm::StringRef Section,
    unsigned int TypeAndAttributes,
    llvm::SectionKind K,
    const char* BeginSymName = nullptr)

Declared at: llvm/include/llvm/MC/MCContext.h:557

Parameters

llvm::StringRef Segment
llvm::StringRef Section
unsigned int TypeAndAttributes
llvm::SectionKind K
const char* BeginSymName = nullptr

const std::string& getMainFileName() const

Description

Get the main file name for use in error messages and debug info. This can be set to ensure we've got the correct file name after preprocessing or for -save-temps.

Declared at: llvm/include/llvm/MC/MCContext.h:711

const llvm::MCObjectFileInfo* getObjectFileInfo()
    const

Declared at: llvm/include/llvm/MC/MCContext.h:451

llvm::MCContext::Environment getObjectFileType()
    const

Declared at: llvm/include/llvm/MC/MCContext.h:430

llvm::MCSymbol* getOrCreateDirectionalLocalSymbol(
    unsigned int LocalLabelVal,
    unsigned int Instance)

Declared at: llvm/include/llvm/MC/MCContext.h:372

Parameters

unsigned int LocalLabelVal
unsigned int Instance

llvm::MCSymbol* getOrCreateFrameAllocSymbol(
    llvm::StringRef FuncName,
    unsigned int Idx)

Description

Gets a symbol that will be defined to the final stack offset of a local variable after codegen.

Declared at: llvm/include/llvm/MC/MCContext.h:510

Parameters

llvm::StringRef FuncName
unsigned int Idx
- The index of a local variable passed to @ llvm.localescape.

llvm::MCSymbol* getOrCreateLSDASymbol(
    llvm::StringRef FuncName)

Declared at: llvm/include/llvm/MC/MCContext.h:514

Parameters

llvm::StringRef FuncName

llvm::MCSymbol*
getOrCreateParentFrameOffsetSymbol(
    llvm::StringRef FuncName)

Declared at: llvm/include/llvm/MC/MCContext.h:512

Parameters

llvm::StringRef FuncName

llvm::MCSymbol* getOrCreateSymbol(
    const llvm::Twine& Name)

Description

Lookup the symbol inside with the specified \p Name. If it exists, return it. If not, create a forward reference and return it.

Declared at: llvm/include/llvm/MC/MCContext.h:504

Parameters

const llvm::Twine& Name
- The symbol name, which must be unique across all symbols.

const llvm::MCRegisterInfo* getRegisterInfo()
    const

Declared at: llvm/include/llvm/MC/MCContext.h:449

llvm::MCSectionSPIRV* getSPIRVSection()

Declared at: llvm/include/llvm/MC/MCContext.h:643

llvm::raw_fd_ostream* getSecureLog()

Declared at: llvm/include/llvm/MC/MCContext.h:832

char* getSecureLogFile()

Description

@ }

Declared at: llvm/include/llvm/MC/MCContext.h:831

bool getSecureLogUsed()

Declared at: llvm/include/llvm/MC/MCContext.h:838

const llvm::SourceMgr* getSourceManager() const

Declared at: llvm/include/llvm/MC/MCContext.h:436

llvm::MCSubtargetInfo& getSubtargetCopy(
    const llvm::MCSubtargetInfo& STI)

Declared at: llvm/include/llvm/MC/MCContext.h:682

Parameters

const llvm::MCSubtargetInfo& STI

const llvm::MCSubtargetInfo* getSubtargetInfo()
    const

Declared at: llvm/include/llvm/MC/MCContext.h:453

const llvm::StringRef&
getSwift5ReflectionSegmentName() const

Declared at: llvm/include/llvm/MC/MCContext.h:432

const llvm::MCContext::SymbolTable& getSymbols()
    const

Description

getSymbols - Get a reference for the symbol table for clients that want to, for example, iterate over all symbols. 'const' because we still want any modifications to the table itself to use the MCContext APIs.

Declared at: llvm/include/llvm/MC/MCContext.h:526

const llvm::Triple& getTargetTriple() const

Declared at: llvm/include/llvm/MC/MCContext.h:435

llvm::MCSectionWasm* getWasmSection(
    const llvm::Twine& Section,
    llvm::SectionKind K,
    unsigned int Flags,
    const llvm::Twine& Group,
    unsigned int UniqueID,
    const char* BeginSymName)

Declared at: llvm/include/llvm/MC/MCContext.h:661

Parameters

const llvm::Twine& Section
llvm::SectionKind K
unsigned int Flags
const llvm::Twine& Group
unsigned int UniqueID
const char* BeginSymName

llvm::MCSectionWasm* getWasmSection(
    const llvm::Twine& Section,
    llvm::SectionKind K,
    unsigned int Flags,
    const llvm::MCSymbolWasm* Group,
    unsigned int UniqueID,
    const char* BeginSymName)

Declared at: llvm/include/llvm/MC/MCContext.h:665

Parameters

const llvm::Twine& Section
llvm::SectionKind K
unsigned int Flags
const llvm::MCSymbolWasm* Group
unsigned int UniqueID
const char* BeginSymName

llvm::MCSectionWasm* getWasmSection(
    const llvm::Twine& Section,
    llvm::SectionKind K,
    unsigned int Flags,
    const char* BeginSymName)

Declared at: llvm/include/llvm/MC/MCContext.h:650

Parameters

const llvm::Twine& Section
llvm::SectionKind K
unsigned int Flags
const char* BeginSymName

llvm::MCSectionWasm* getWasmSection(
    const llvm::Twine& Section,
    llvm::SectionKind K,
    unsigned int Flags = 0)

Declared at: llvm/include/llvm/MC/MCContext.h:645

Parameters

const llvm::Twine& Section
llvm::SectionKind K
unsigned int Flags = 0

llvm::MCSectionWasm* getWasmSection(
    const llvm::Twine& Section,
    llvm::SectionKind K,
    unsigned int Flags,
    const llvm::Twine& Group,
    unsigned int UniqueID)

Declared at: llvm/include/llvm/MC/MCContext.h:655

Parameters

const llvm::Twine& Section
llvm::SectionKind K
unsigned int Flags
const llvm::Twine& Group
unsigned int UniqueID

llvm::MCSectionXCOFF* getXCOFFSection(
    llvm::StringRef Section,
    llvm::SectionKind K,
    Optional<XCOFF::CsectProperties> CsectProp =
        None,
    bool MultiSymbolsAllowed = false,
    const char* BeginSymName = nullptr,
    Optional<XCOFF::DwarfSectionSubtypeFlags>
        DwarfSubtypeFlags = None)

Declared at: llvm/include/llvm/MC/MCContext.h:675

Parameters

llvm::StringRef Section
llvm::SectionKind K
Optional<XCOFF::CsectProperties> CsectProp = None
bool MultiSymbolsAllowed = false
const char* BeginSymName = nullptr
Optional<XCOFF::DwarfSectionSubtypeFlags> DwarfSubtypeFlags = None

bool hadError()

Declared at: llvm/include/llvm/MC/MCContext.h:847

bool hasXCOFFSection(
    llvm::StringRef Section,
    XCOFF::CsectProperties CsectProp) const

Declared at: llvm/include/llvm/MC/MCContext.h:672

Parameters

llvm::StringRef Section
XCOFF::CsectProperties CsectProp

void initInlineSourceManager()

Declared at: llvm/include/llvm/MC/MCContext.h:438

bool isDwarfMD5UsageConsistent(
    unsigned int CUID) const

Description

Reports whether MD5 checksum usage is consistent (all-or-none).

Declared at: llvm/include/llvm/MC/MCContext.h:761

Parameters

unsigned int CUID

bool isELFGenericMergeableSection(
    llvm::StringRef Name)

Declared at: llvm/include/llvm/MC/MCContext.h:614

Parameters

llvm::StringRef Name

bool isELFImplicitMergeableSectionNamePrefix(
    llvm::StringRef Name)

Declared at: llvm/include/llvm/MC/MCContext.h:612

Parameters

llvm::StringRef Name

bool isValidDwarfFileNumber(
    unsigned int FileNumber,
    unsigned int CUID = 0)

Declared at: llvm/include/llvm/MC/MCContext.h:722

Parameters

unsigned int FileNumber
unsigned int CUID = 0

const llvm::MCAsmMacro* lookupMacro(
    llvm::StringRef Name)

Declared at: llvm/include/llvm/MC/MCContext.h:852

Parameters

llvm::StringRef Name

llvm::MCSymbol* lookupSymbol(
    const llvm::Twine& Name) const

Description

Get the symbol for \p Name, or null.

Declared at: llvm/include/llvm/MC/MCContext.h:517

Parameters

const llvm::Twine& Name

void recordELFMergeableSectionInfo(
    llvm::StringRef SectionName,
    unsigned int Flags,
    unsigned int UniqueID,
    unsigned int EntrySize)

Declared at: llvm/include/llvm/MC/MCContext.h:609

Parameters

llvm::StringRef SectionName
unsigned int Flags
unsigned int UniqueID
unsigned int EntrySize

void registerInlineAsmLabel(llvm::MCSymbol* Sym)

Description

registerInlineAsmLabel - Records that the name is a label referenced in inline assembly.

Declared at: llvm/include/llvm/MC/MCContext.h:536

Parameters

llvm::MCSymbol* Sym

void remapDebugPath(SmallVectorImpl<char>& Path)

Description

Remap one path in-place as per the debug prefix map.

Declared at: llvm/include/llvm/MC/MCContext.h:703

Parameters

SmallVectorImpl<char>& Path

void reportCommon(
    llvm::SMLoc Loc,
    std::function<void(SMDiagnostic&,
                       const SourceMgr*)>)

Declared at: llvm/include/llvm/MC/MCContext.h:364

Parameters

llvm::SMLoc Loc
std::function<void(SMDiagnostic&, const SourceMgr*)>

void reportError(llvm::SMLoc L,
                 const llvm::Twine& Msg)

Declared at: llvm/include/llvm/MC/MCContext.h:849

Parameters

llvm::SMLoc L
const llvm::Twine& Msg

void reportWarning(llvm::SMLoc L,
                   const llvm::Twine& Msg)

Declared at: llvm/include/llvm/MC/MCContext.h:850

Parameters

llvm::SMLoc L
const llvm::Twine& Msg

void reset()

Description

reset - return object to right after construction state to prepare to process a new module

Declared at: llvm/include/llvm/MC/MCContext.h:465

void setAllowTemporaryLabels(bool Value)

Declared at: llvm/include/llvm/MC/MCContext.h:457

Parameters

bool Value

void setCompilationDir(llvm::StringRef S)

Description

Set the compilation directory for DW_AT_comp_dir

Declared at: llvm/include/llvm/MC/MCContext.h:697

Parameters

llvm::StringRef S

void setCurrentDwarfLoc(
    unsigned int FileNum,
    unsigned int Line,
    unsigned int Column,
    unsigned int Flags,
    unsigned int Isa,
    unsigned int Discriminator)

Description

Saves the information from the currently parsed dwarf .loc directive and sets DwarfLocSeen. When the next instruction is assembled an entry in the line number table with this information and the address of the instruction will be created.

Declared at: llvm/include/llvm/MC/MCContext.h:769

Parameters

unsigned int FileNum
unsigned int Line
unsigned int Column
unsigned int Flags
unsigned int Isa
unsigned int Discriminator

void setDiagnosticHandler(
    llvm::MCContext::DiagHandlerTy DiagHandler)

Declared at: llvm/include/llvm/MC/MCContext.h:441

Parameters

llvm::MCContext::DiagHandlerTy DiagHandler

void setDwarfCompileUnitID(unsigned int CUIndex)

Declared at: llvm/include/llvm/MC/MCContext.h:748

Parameters

unsigned int CUIndex

void setDwarfDebugFlags(llvm::StringRef S)

Declared at: llvm/include/llvm/MC/MCContext.h:817

Parameters

llvm::StringRef S

void setDwarfDebugProducer(llvm::StringRef S)

Declared at: llvm/include/llvm/MC/MCContext.h:820

Parameters

llvm::StringRef S

void setDwarfFormat(dwarf::DwarfFormat f)

Declared at: llvm/include/llvm/MC/MCContext.h:823

Parameters

dwarf::DwarfFormat f

void setDwarfVersion(uint16_t v)

Declared at: llvm/include/llvm/MC/MCContext.h:826

Parameters

uint16_t v

void setGenDwarfFileNumber(
    unsigned int FileNumber)

Declared at: llvm/include/llvm/MC/MCContext.h:791

Parameters

unsigned int FileNumber

void setGenDwarfForAssembly(bool Value)

Declared at: llvm/include/llvm/MC/MCContext.h:787

Parameters

bool Value

void setGenDwarfRootFile(llvm::StringRef FileName,
                         llvm::StringRef Buffer)

Description

Specifies information about the "root file" for assembler clients (e.g., llvm-mc). Assumes compilation dir etc. have been set up.

Declared at: llvm/include/llvm/MC/MCContext.h:797

Parameters

llvm::StringRef FileName
llvm::StringRef Buffer

void setMCLineTableRootFile(
    unsigned int CUID,
    llvm::StringRef CompilationDir,
    llvm::StringRef Filename,
    Optional<MD5::MD5Result> Checksum,
    Optional<llvm::StringRef> Source)

Description

Specifies the "root" file and directory of the compilation unit. These are "file 0" and "directory 0" in DWARF v5.

Declared at: llvm/include/llvm/MC/MCContext.h:752

Parameters

unsigned int CUID
llvm::StringRef CompilationDir
llvm::StringRef Filename
Optional<MD5::MD5Result> Checksum
Optional<llvm::StringRef> Source

void setMainFileName(llvm::StringRef S)

Description

Set the main file name and override the default.

Declared at: llvm/include/llvm/MC/MCContext.h:714

Parameters

llvm::StringRef S

void setObjectFileInfo(
    const llvm::MCObjectFileInfo* Mofi)

Declared at: llvm/include/llvm/MC/MCContext.h:445

Parameters

const llvm::MCObjectFileInfo* Mofi

void setSecureLog(
    std::unique_ptr<raw_fd_ostream> Value)

Declared at: llvm/include/llvm/MC/MCContext.h:834

Parameters

std::unique_ptr<raw_fd_ostream> Value

void setSecureLogUsed(bool Value)

Declared at: llvm/include/llvm/MC/MCContext.h:839

Parameters

bool Value

void setSymbolValue(llvm::MCStreamer& Streamer,
                    llvm::StringRef Sym,
                    uint64_t Val)

Description

Set value for a symbol.

Declared at: llvm/include/llvm/MC/MCContext.h:520

Parameters

llvm::MCStreamer& Streamer
llvm::StringRef Sym
uint64_t Val

void setUseNamesOnTempLabels(bool Value)

Declared at: llvm/include/llvm/MC/MCContext.h:458

Parameters

bool Value

void undefineMacro(llvm::StringRef Name)

Declared at: llvm/include/llvm/MC/MCContext.h:861

Parameters

llvm::StringRef Name

~MCContext()

Declared at: llvm/include/llvm/MC/MCContext.h:428