LLVM 19.0.0git
Classes | Public Types | Public Member Functions | List of all members
llvm::MCContext Class Reference

Context object for machine code objects. More...

#include "llvm/MC/MCContext.h"

Public Types

enum  Environment {
  IsMachO , IsELF , IsGOFF , IsCOFF ,
  IsSPIRV , IsWasm , IsXCOFF , IsDXContainer
}
 
using SymbolTable = StringMap< MCSymbol *, BumpPtrAllocator & >
 
using DiagHandlerTy = std::function< void(const SMDiagnostic &, bool, const SourceMgr &, std::vector< const MDNode * > &)>
 

Public Member Functions

 MCContext (const Triple &TheTriple, const MCAsmInfo *MAI, const MCRegisterInfo *MRI, const MCSubtargetInfo *MSTI, const SourceMgr *Mgr=nullptr, MCTargetOptions const *TargetOpts=nullptr, bool DoAutoReset=true, StringRef Swift5ReflSegmentName={})
 
 MCContext (const MCContext &)=delete
 
MCContextoperator= (const MCContext &)=delete
 
 ~MCContext ()
 
Environment getObjectFileType () const
 
const StringRefgetSwift5ReflectionSegmentName () const
 
const TriplegetTargetTriple () const
 
const SourceMgrgetSourceManager () const
 
void initInlineSourceManager ()
 
SourceMgrgetInlineSourceManager ()
 
std::vector< const MDNode * > & getLocInfos ()
 
void setDiagnosticHandler (DiagHandlerTy DiagHandler)
 
void setObjectFileInfo (const MCObjectFileInfo *Mofi)
 
const MCAsmInfogetAsmInfo () const
 
const MCRegisterInfogetRegisterInfo () const
 
const MCObjectFileInfogetObjectFileInfo () const
 
const MCSubtargetInfogetSubtargetInfo () const
 
const MCTargetOptionsgetTargetOptions () const
 
CodeViewContextgetCVContext ()
 
void setAllowTemporaryLabels (bool Value)
 
void setUseNamesOnTempLabels (bool Value)
 
StringRef getSecureLogFile ()
 
raw_fd_ostreamgetSecureLog ()
 
void setSecureLog (std::unique_ptr< raw_fd_ostream > Value)
 
bool getSecureLogUsed ()
 
void setSecureLogUsed (bool Value)
 
void * allocate (unsigned Size, unsigned Align=8)
 
void deallocate (void *Ptr)
 
bool hadError ()
 
void diagnose (const SMDiagnostic &SMD)
 
void reportError (SMLoc L, const Twine &Msg)
 
void reportWarning (SMLoc L, const Twine &Msg)
 
const MCAsmMacrolookupMacro (StringRef Name)
 
void defineMacro (StringRef Name, MCAsmMacro Macro)
 
void undefineMacro (StringRef Name)
 
MCPseudoProbeTablegetMCPseudoProbeTable ()
 
Module Lifetime Management
void reset ()
 reset - return object to right after construction state to prepare to process a new module
 
McInst Management
MCInstcreateMCInst ()
 Create and return a new MC instruction.
 
Symbol Management
MCSymbolcreateLinkerPrivateTempSymbol ()
 Create a new linker temporary symbol with the specified prefix (Name) or "tmp".
 
MCSymbolcreateLinkerPrivateSymbol (const Twine &Name)
 
MCSymbolcreateTempSymbol ()
 Create a temporary symbol with a unique name.
 
MCSymbolcreateTempSymbol (const Twine &Name, bool AlwaysAddSuffix=true)
 
MCSymbolcreateNamedTempSymbol ()
 Create a temporary symbol with a unique name whose name cannot be omitted in the symbol table.
 
MCSymbolcreateNamedTempSymbol (const Twine &Name)
 
MCSymbolcreateDirectionalLocalSymbol (unsigned LocalLabelVal)
 Create the definition of a directional local symbol for numbered label (used for "1:" definitions).
 
MCSymbolgetDirectionalLocalSymbol (unsigned LocalLabelVal, bool Before)
 Create and return a directional local symbol for numbered label (used for "1b" or 1f" references).
 
MCSymbolgetOrCreateSymbol (const Twine &Name)
 Lookup the symbol inside with the specified Name.
 
MCSymbolgetOrCreateFrameAllocSymbol (const Twine &FuncName, unsigned Idx)
 Gets a symbol that will be defined to the final stack offset of a local variable after codegen.
 
MCSymbolgetOrCreateParentFrameOffsetSymbol (const Twine &FuncName)
 
MCSymbolgetOrCreateLSDASymbol (const Twine &FuncName)
 
MCSymbollookupSymbol (const Twine &Name) const
 Get the symbol for Name, or null.
 
void setSymbolValue (MCStreamer &Streamer, const Twine &Sym, uint64_t Val)
 Set value for a symbol.
 
const SymbolTablegetSymbols () const
 getSymbols - Get a reference for the symbol table for clients that want to, for example, iterate over all symbols.
 
MCSymbolgetInlineAsmLabel (StringRef Name) const
 isInlineAsmLabel - Return true if the name is a label referenced in inline assembly.
 
void registerInlineAsmLabel (MCSymbol *Sym)
 registerInlineAsmLabel - Records that the name is a label referenced in inline assembly.
 
Dwarf Management
StringRef getCompilationDir () const
 Get the compilation directory for DW_AT_comp_dir The compilation directory should be set with setCompilationDir before calling this function.
 
void setCompilationDir (StringRef S)
 Set the compilation directory for DW_AT_comp_dir.
 
void addDebugPrefixMapEntry (const std::string &From, const std::string &To)
 Add an entry to the debug prefix map.
 
void remapDebugPath (SmallVectorImpl< char > &Path)
 Remap one path in-place as per the debug prefix map.
 
void RemapDebugPaths ()
 
const std::string & getMainFileName () const
 Get the main file name for use in error messages and debug info.
 
void setMainFileName (StringRef S)
 Set the main file name and override the default.
 
Expected< unsignedgetDwarfFile (StringRef Directory, StringRef FileName, unsigned FileNumber, std::optional< MD5::MD5Result > Checksum, std::optional< StringRef > Source, unsigned CUID)
 Creates an entry in the dwarf file and directory tables.
 
bool isValidDwarfFileNumber (unsigned FileNumber, unsigned CUID=0)
 isValidDwarfFileNumber - takes a dwarf file number and returns true if it currently is assigned and false otherwise.
 
const std::map< unsigned, MCDwarfLineTable > & getMCDwarfLineTables () const
 
MCDwarfLineTablegetMCDwarfLineTable (unsigned CUID)
 
const MCDwarfLineTablegetMCDwarfLineTable (unsigned CUID) const
 
const SmallVectorImpl< MCDwarfFile > & getMCDwarfFiles (unsigned CUID=0)
 
const SmallVectorImpl< std::string > & getMCDwarfDirs (unsigned CUID=0)
 
unsigned getDwarfCompileUnitID ()
 
void setDwarfCompileUnitID (unsigned CUIndex)
 
void setMCLineTableRootFile (unsigned CUID, StringRef CompilationDir, StringRef Filename, std::optional< MD5::MD5Result > Checksum, std::optional< StringRef > Source)
 Specifies the "root" file and directory of the compilation unit.
 
bool isDwarfMD5UsageConsistent (unsigned CUID) const
 Reports whether MD5 checksum usage is consistent (all-or-none).
 
void setCurrentDwarfLoc (unsigned FileNum, unsigned Line, unsigned Column, unsigned Flags, unsigned Isa, unsigned Discriminator)
 Saves the information from the currently parsed dwarf .loc directive and sets DwarfLocSeen.
 
void clearDwarfLocSeen ()
 
bool getDwarfLocSeen ()
 
const MCDwarfLocgetCurrentDwarfLoc ()
 
bool getGenDwarfForAssembly ()
 
void setGenDwarfForAssembly (bool Value)
 
unsigned getGenDwarfFileNumber ()
 
EmitDwarfUnwindType emitDwarfUnwindInfo () const
 
bool emitCompactUnwindNonCanonical () const
 
void setGenDwarfFileNumber (unsigned FileNumber)
 
void setGenDwarfRootFile (StringRef FileName, StringRef Buffer)
 Specifies information about the "root file" for assembler clients (e.g., llvm-mc).
 
const SetVector< MCSection * > & getGenDwarfSectionSyms ()
 
bool addGenDwarfSection (MCSection *Sec)
 
void finalizeDwarfSections (MCStreamer &MCOS)
 Remove empty sections from SectionsForRanges, to avoid generating useless debug info for them.
 
const std::vector< MCGenDwarfLabelEntry > & getMCGenDwarfLabelEntries () const
 
void addMCGenDwarfLabelEntry (const MCGenDwarfLabelEntry &E)
 
void setDwarfDebugFlags (StringRef S)
 
StringRef getDwarfDebugFlags ()
 
void setDwarfDebugProducer (StringRef S)
 
StringRef getDwarfDebugProducer ()
 
void setDwarfFormat (dwarf::DwarfFormat f)
 
dwarf::DwarfFormat getDwarfFormat () const
 
void setDwarfVersion (uint16_t v)
 
uint16_t getDwarfVersion () const
 

Section Management

enum  : unsigned { GenericSectionID = ~0U }
 
MCSectionMachOgetMachOSection (StringRef Segment, StringRef Section, unsigned TypeAndAttributes, unsigned Reserved2, SectionKind K, const char *BeginSymName=nullptr)
 Return the MCSection for the specified mach-o section.
 
MCSectionMachOgetMachOSection (StringRef Segment, StringRef Section, unsigned TypeAndAttributes, SectionKind K, const char *BeginSymName=nullptr)
 
MCSectionELFgetELFSection (const Twine &Section, unsigned Type, unsigned Flags)
 
MCSectionELFgetELFSection (const Twine &Section, unsigned Type, unsigned Flags, unsigned EntrySize)
 
MCSectionELFgetELFSection (const Twine &Section, unsigned Type, unsigned Flags, unsigned EntrySize, const Twine &Group, bool IsComdat)
 
MCSectionELFgetELFSection (const Twine &Section, unsigned Type, unsigned Flags, unsigned EntrySize, const Twine &Group, bool IsComdat, unsigned UniqueID, const MCSymbolELF *LinkedToSym)
 
MCSectionELFgetELFSection (const Twine &Section, unsigned Type, unsigned Flags, unsigned EntrySize, const MCSymbolELF *Group, bool IsComdat, unsigned UniqueID, const MCSymbolELF *LinkedToSym)
 
MCSectionELFgetELFNamedSection (const Twine &Prefix, const Twine &Suffix, unsigned Type, unsigned Flags, unsigned EntrySize=0)
 Get a section with the provided group identifier.
 
MCSectionELFcreateELFRelSection (const Twine &Name, unsigned Type, unsigned Flags, unsigned EntrySize, const MCSymbolELF *Group, const MCSectionELF *RelInfoSection)
 
MCSectionELFcreateELFGroupSection (const MCSymbolELF *Group, bool IsComdat)
 
void recordELFMergeableSectionInfo (StringRef SectionName, unsigned Flags, unsigned UniqueID, unsigned EntrySize)
 
bool isELFImplicitMergeableSectionNamePrefix (StringRef Name)
 
bool isELFGenericMergeableSection (StringRef Name)
 
std::optional< unsignedgetELFUniqueIDForEntsize (StringRef SectionName, unsigned Flags, unsigned EntrySize)
 Return the unique ID of the section with the given name, flags and entry size, if it exists.
 
MCSectionGOFFgetGOFFSection (StringRef Section, SectionKind Kind, MCSection *Parent, const MCExpr *SubsectionId)
 
MCSectionCOFFgetCOFFSection (StringRef Section, unsigned Characteristics, SectionKind Kind, StringRef COMDATSymName, int Selection, unsigned UniqueID=GenericSectionID, const char *BeginSymName=nullptr)
 
MCSectionCOFFgetCOFFSection (StringRef Section, unsigned Characteristics, SectionKind Kind, const char *BeginSymName=nullptr)
 
MCSectionCOFFgetAssociativeCOFFSection (MCSectionCOFF *Sec, const MCSymbol *KeySym, unsigned UniqueID=GenericSectionID)
 Gets or creates a section equivalent to Sec that is associated with the section containing KeySym.
 
MCSectionSPIRVgetSPIRVSection ()
 
MCSectionWasmgetWasmSection (const Twine &Section, SectionKind K, unsigned Flags=0)
 
MCSectionWasmgetWasmSection (const Twine &Section, SectionKind K, unsigned Flags, const char *BeginSymName)
 
MCSectionWasmgetWasmSection (const Twine &Section, SectionKind K, unsigned Flags, const Twine &Group, unsigned UniqueID)
 
MCSectionWasmgetWasmSection (const Twine &Section, SectionKind K, unsigned Flags, const Twine &Group, unsigned UniqueID, const char *BeginSymName)
 
MCSectionWasmgetWasmSection (const Twine &Section, SectionKind K, unsigned Flags, const MCSymbolWasm *Group, unsigned UniqueID, const char *BeginSymName)
 
MCSectionDXContainergetDXContainerSection (StringRef Section, SectionKind K)
 Get the section for the provided Section name.
 
bool hasXCOFFSection (StringRef Section, XCOFF::CsectProperties CsectProp) const
 
MCSectionXCOFFgetXCOFFSection (StringRef Section, SectionKind K, std::optional< XCOFF::CsectProperties > CsectProp=std::nullopt, bool MultiSymbolsAllowed=false, const char *BeginSymName=nullptr, std::optional< XCOFF::DwarfSectionSubtypeFlags > DwarfSubtypeFlags=std::nullopt)
 
MCSubtargetInfogetSubtargetCopy (const MCSubtargetInfo &STI)
 
uint8_t getBBAddrMapVersion () const
 

Detailed Description

Context object for machine code objects.

This class owns all of the sections that it creates.

Definition at line 76 of file MCContext.h.

Member Typedef Documentation

◆ DiagHandlerTy

using llvm::MCContext::DiagHandlerTy = std::function<void(const SMDiagnostic &, bool, const SourceMgr &, std::vector<const MDNode *> &)>

Definition at line 79 of file MCContext.h.

◆ SymbolTable

Definition at line 78 of file MCContext.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum : unsigned
Enumerator
GenericSectionID 

Pass this value as the UniqueID during section creation to get the generic section with the given name and characteristics.

The usual sections such as .text use this ID.

Definition at line 546 of file MCContext.h.

◆ Environment

Enumerator
IsMachO 
IsELF 
IsGOFF 
IsCOFF 
IsSPIRV 
IsWasm 
IsXCOFF 
IsDXContainer 

Definition at line 82 of file MCContext.h.

Constructor & Destructor Documentation

◆ MCContext() [1/2]

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

◆ MCContext() [2/2]

llvm::MCContext::MCContext ( const MCContext )
delete

◆ ~MCContext()

MCContext::~MCContext ( )

Definition at line 117 of file MCContext.cpp.

References reset().

Member Function Documentation

◆ addDebugPrefixMapEntry()

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

Add an entry to the debug prefix map.

Definition at line 888 of file MCContext.cpp.

References llvm::SmallVectorImpl< T >::emplace_back(), and From.

◆ addGenDwarfSection()

bool llvm::MCContext::addGenDwarfSection ( MCSection Sec)
inline

Definition at line 809 of file MCContext.h.

References llvm::SetVector< T, Vector, Set, N >::insert().

◆ addMCGenDwarfLabelEntry()

void llvm::MCContext::addMCGenDwarfLabelEntry ( const MCGenDwarfLabelEntry E)
inline

Definition at line 819 of file MCContext.h.

References E.

Referenced by llvm::MCGenDwarfLabelEntry::Make().

◆ allocate()

void * llvm::MCContext::allocate ( unsigned  Size,
unsigned  Align = 8 
)
inline

Definition at line 847 of file MCContext.h.

References Allocator, and Size.

◆ clearDwarfLocSeen()

void llvm::MCContext::clearDwarfLocSeen ( )
inline

◆ createDirectionalLocalSymbol()

MCSymbol * MCContext::createDirectionalLocalSymbol ( unsigned  LocalLabelVal)

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

Definition at line 349 of file MCContext.cpp.

◆ createELFGroupSection()

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

◆ createELFRelSection()

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

◆ createLinkerPrivateSymbol()

MCSymbol * MCContext::createLinkerPrivateSymbol ( const Twine Name)

◆ createLinkerPrivateTempSymbol()

MCSymbol * MCContext::createLinkerPrivateTempSymbol ( )

Create a new linker temporary symbol with the specified prefix (Name) or "tmp".

This creates a "l"-prefixed symbol for Mach-O and is identical to createNamedTempSymbol for other object file formats.

Definition at line 311 of file MCContext.cpp.

References createLinkerPrivateSymbol().

Referenced by llvm::AsmPrinter::emitKCFITrapEntry().

◆ createMCInst()

MCInst * MCContext::createMCInst ( )

Create and return a new MC instruction.

Definition at line 192 of file MCContext.cpp.

Referenced by llvm::HexagonLowerToMC().

◆ createNamedTempSymbol() [1/2]

MCSymbol * MCContext::createNamedTempSymbol ( )

Create a temporary symbol with a unique name whose name cannot be omitted in the symbol table.

This is rarely used.

Definition at line 323 of file MCContext.cpp.

References createNamedTempSymbol().

Referenced by createNamedTempSymbol(), llvm::AddrLabelMap::getAddrLabelSymbolToEmit(), and llvm::LoongArchAsmBackend::shouldInsertFixupForCodeAlign().

◆ createNamedTempSymbol() [2/2]

MCSymbol * MCContext::createNamedTempSymbol ( const Twine Name)

Definition at line 305 of file MCContext.cpp.

References llvm::MCAsmInfo::getPrivateGlobalPrefix(), and Name.

◆ createTempSymbol() [1/2]

MCSymbol * MCContext::createTempSymbol ( )

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.

Definition at line 321 of file MCContext.cpp.

References createTempSymbol().

Referenced by llvm::MachineFunction::addLandingPad(), ARM64EmitUnwindInfoForSegment(), ARMEmitUnwindInfo(), llvm::DebugHandlerBase::beginInstruction(), createTempSymbol(), llvm::AsmPrinter::createTempSymbol(), llvm::MCGenDwarfInfo::Emit(), llvm::MCDwarfLineTableHeader::Emit(), llvm::MipsELFStreamer::emitCFIEndProcImpl(), llvm::MipsELFStreamer::emitCFILabel(), llvm::MipsELFStreamer::emitCFIStartProcImpl(), llvm::MCObjectStreamer::emitCVLocDirective(), emitDirectiveRelocJalr(), llvm::CodeViewContext::emitFileChecksums(), llvm::SystemZAsmPrinter::emitFunctionEntryLabel(), EmitGenDwarfInfo(), emitGenDwarfRanges(), llvm::ARMAsmPrinter::emitInstruction(), llvm::SystemZAsmPrinter::emitInstruction(), llvm::X86AsmPrinter::emitInstruction(), llvm::X86AsmPrinter::emitKCFITypeId(), llvm::CodeViewContext::emitLineTableForFunction(), llvm::mcdwarf::emitListsTableHeaderStart(), llvm::ARMAsmPrinter::emitMachineConstantPoolValue(), llvm::CSKYAsmPrinter::emitMachineConstantPoolValue(), EmitNop(), llvm::AsmPrinter::emitPCSections(), llvm::AsmPrinter::emitPCSectionsLabel(), llvm::AArch64FrameLowering::emitPrologue(), llvm::HexagonAsmPrinter::EmitSled(), llvm::LoongArchAsmPrinter::emitSled(), llvm::CodeViewContext::emitStringTable(), EmitUnwindInfo(), llvm::AsmPrinter::emitXRayTable(), llvm::DebugHandlerBase::endInstruction(), llvm::AddrLabelMap::getAddrLabelSymbolToEmit(), getCOFFSection(), llvm::MCSection::getEndSymbol(), llvm::AArch64_MachoTargetObjectFile::getIndirectSymViaGOTPCRel(), getMachOSection(), llvm::AArch64_MachoTargetObjectFile::getTTypeGlobalReference(), llvm::TargetLoweringObjectFile::getTTypeReference(), getXCOFFSection(), llvm::MCDwarfLineEntry::make(), and llvm::MCGenDwarfLabelEntry::Make().

◆ createTempSymbol() [2/2]

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

Definition at line 299 of file MCContext.cpp.

References llvm::MCAsmInfo::getPrivateGlobalPrefix(), and Name.

◆ deallocate()

void llvm::MCContext::deallocate ( void *  Ptr)
inline

Definition at line 851 of file MCContext.h.

◆ defineMacro()

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

Definition at line 863 of file MCContext.h.

References llvm::Macro, and Name.

◆ diagnose()

void MCContext::diagnose ( const SMDiagnostic SMD)

Definition at line 1019 of file MCContext.cpp.

References assert(), and llvm_unreachable.

◆ emitCompactUnwindNonCanonical()

bool MCContext::emitCompactUnwindNonCanonical ( ) const

◆ emitDwarfUnwindInfo()

EmitDwarfUnwindType MCContext::emitDwarfUnwindInfo ( ) const

Definition at line 928 of file MCContext.cpp.

References llvm::Default.

◆ finalizeDwarfSections()

void MCContext::finalizeDwarfSections ( MCStreamer MCOS)

Remove empty sections from SectionsForRanges, to avoid generating useless debug info for them.

Definition at line 1004 of file MCContext.cpp.

References llvm::MCStreamer::mayHaveInstructions().

Referenced by llvm::MCGenDwarfInfo::Emit().

◆ getAsmInfo()

const MCAsmInfo * llvm::MCContext::getAsmInfo ( ) const
inline

◆ getAssociativeCOFFSection()

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

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.

Definition at line 706 of file MCContext.cpp.

References Characteristics, GenericSectionID, llvm::MCSectionCOFF::getCharacteristics(), getCOFFSection(), llvm::MCSection::getKind(), llvm::MCSection::getName(), llvm::MCSymbol::getName(), llvm::COFF::IMAGE_COMDAT_SELECT_ASSOCIATIVE, and llvm::COFF::IMAGE_SCN_LNK_COMDAT.

Referenced by getCOFFStaticStructorSection().

◆ getBBAddrMapVersion()

uint8_t llvm::MCContext::getBBAddrMapVersion ( ) const
inline

Definition at line 688 of file MCContext.h.

◆ getCOFFSection() [1/2]

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

Definition at line 698 of file MCContext.cpp.

References Characteristics, GenericSectionID, and getCOFFSection().

◆ getCOFFSection() [2/2]

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

◆ getCompilationDir()

StringRef llvm::MCContext::getCompilationDir ( ) const
inline

Get the compilation directory for DW_AT_comp_dir The compilation directory should be set with setCompilationDir before calling this function.

If it is unset, an empty string will be returned.

Definition at line 698 of file MCContext.h.

Referenced by EmitGenDwarfAbbrev(), EmitGenDwarfInfo(), and setGenDwarfRootFile().

◆ getCurrentDwarfLoc()

const MCDwarfLoc & llvm::MCContext::getCurrentDwarfLoc ( )
inline

Definition at line 789 of file MCContext.h.

Referenced by llvm::MCDwarfLineEntry::make().

◆ getCVContext()

CodeViewContext & MCContext::getCVContext ( )

◆ getDirectionalLocalSymbol()

MCSymbol * MCContext::getDirectionalLocalSymbol ( unsigned  LocalLabelVal,
bool  Before 
)

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

Definition at line 354 of file MCContext.cpp.

References Before.

◆ getDwarfCompileUnitID()

unsigned llvm::MCContext::getDwarfCompileUnitID ( )
inline

Definition at line 751 of file MCContext.h.

Referenced by llvm::MCDwarfLineEntry::make().

◆ getDwarfDebugFlags()

StringRef llvm::MCContext::getDwarfDebugFlags ( )
inline

Definition at line 824 of file MCContext.h.

Referenced by EmitGenDwarfAbbrev(), and EmitGenDwarfInfo().

◆ getDwarfDebugProducer()

StringRef llvm::MCContext::getDwarfDebugProducer ( )
inline

Definition at line 827 of file MCContext.h.

Referenced by EmitGenDwarfInfo().

◆ getDwarfFile()

Expected< unsigned > MCContext::getDwarfFile ( StringRef  Directory,
StringRef  FileName,
unsigned  FileNumber,
std::optional< MD5::MD5Result Checksum,
std::optional< StringRef Source,
unsigned  CUID 
)

Creates an entry in the dwarf file and directory tables.

getDwarfFile - takes a file name and number to place in the dwarf file and directory tables.

If the file number has already been allocated it is an error and zero is returned and the client reports the error, else the allocated file number is returned. The file numbers may be in any order.

Definition at line 981 of file MCContext.cpp.

References llvm::MCDwarfLineTable::tryGetFile().

Referenced by llvm::MCStreamer::tryEmitDwarfFileDirective().

◆ getDwarfFormat()

dwarf::DwarfFormat llvm::MCContext::getDwarfFormat ( ) const
inline

◆ getDwarfLocSeen()

bool llvm::MCContext::getDwarfLocSeen ( )
inline

Definition at line 788 of file MCContext.h.

Referenced by llvm::MCDwarfLineEntry::make().

◆ getDwarfVersion()

uint16_t llvm::MCContext::getDwarfVersion ( ) const
inline

◆ getDXContainerSection()

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

Get the section for the provided Section name.

Definition at line 861 of file MCContext.cpp.

References F, and Name.

Referenced by DXILTargetObjectFile::getExplicitSectionGlobal().

◆ getELFNamedSection()

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

Get a section with the provided group identifier.

This section is named by concatenating Prefix with '.' then Suffix. The Type describes the type of the section and Flags are used to further configure this named section.

Definition at line 516 of file MCContext.cpp.

References getELFSection().

Referenced by llvm::TargetLoweringObjectFileELF::emitPersonalityValue().

◆ getELFSection() [1/5]

MCSectionELF * llvm::MCContext::getELFSection ( const Twine Section,
unsigned  Type,
unsigned  Flags 
)
inline

Definition at line 567 of file MCContext.h.

References getELFSection().

Referenced by llvm::AsmPrinter::doFinalization(), llvm::MCELFStreamer::emitCommonSymbol(), llvm::MCELFStreamer::emitIdent(), llvm::MipsRegInfoRecord::EmitMipsOptionRecord(), llvm::AsmPrinter::emitPatchableFunctionEntries(), llvm::MipsAsmPrinter::emitStartOfAsmFile(), llvm::X86AsmPrinter::emitStartOfAsmFile(), llvm::AsmPrinter::emitXRayTable(), llvm::MCObjectFileInfo::getBBAddrMapSection(), getELFNamedSection(), getELFSection(), llvm::HexagonTargetObjectFile::getExplicitSectionGlobal(), llvm::XCoreTargetObjectFile::getExplicitSectionGlobal(), llvm::MCObjectFileInfo::getKCFITrapSection(), llvm::MCObjectFileInfo::getPCSection(), llvm::MCObjectFileInfo::getPseudoProbeDescSection(), llvm::MCObjectFileInfo::getPseudoProbeSection(), llvm::TargetLoweringObjectFileELF::getSectionForCommandLines(), llvm::TargetLoweringObjectFileELF::getSectionForLSDA(), llvm::TargetLoweringObjectFileELF::getSectionForMachineBasicBlock(), llvm::MCObjectFileInfo::getStackSizesSection(), getStaticStructorSection(), llvm::HexagonMCELFStreamer::HexagonMCEmitCommonSymbol(), llvm::ARMElfTargetObjectFile::Initialize(), llvm::AVRTargetObjectFile::Initialize(), llvm::HexagonTargetObjectFile::Initialize(), llvm::LanaiTargetObjectFile::Initialize(), llvm::M68kELFTargetObjectFile::Initialize(), llvm::MipsTargetObjectFile::Initialize(), llvm::RISCVELFTargetObjectFile::Initialize(), llvm::XCoreTargetObjectFile::Initialize(), llvm::TargetLoweringObjectFileELF::InitializeELF(), llvm::MSP430TargetELFStreamer::MSP430TargetELFStreamer(), selectELFSectionForGlobal(), selectExplicitSectionGlobal(), and smallData().

◆ getELFSection() [2/5]

MCSectionELF * llvm::MCContext::getELFSection ( const Twine Section,
unsigned  Type,
unsigned  Flags,
unsigned  EntrySize 
)
inline

Definition at line 572 of file MCContext.h.

References getELFSection(), and llvm::MCSection::NonUniqueID.

◆ getELFSection() [3/5]

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

◆ getELFSection() [4/5]

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

Definition at line 578 of file MCContext.h.

References getELFSection(), and llvm::MCSection::NonUniqueID.

◆ getELFSection() [5/5]

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

◆ getELFUniqueIDForEntsize()

std::optional< unsigned > MCContext::getELFUniqueIDForEntsize ( StringRef  SectionName,
unsigned  Flags,
unsigned  EntrySize 
)

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

Definition at line 641 of file MCContext.cpp.

References I.

Referenced by calcUniqueIDUpdateFlagsAndSize().

◆ getGenDwarfFileNumber()

unsigned llvm::MCContext::getGenDwarfFileNumber ( )
inline

Definition at line 793 of file MCContext.h.

Referenced by llvm::MCGenDwarfLabelEntry::Make().

◆ getGenDwarfForAssembly()

bool llvm::MCContext::getGenDwarfForAssembly ( )
inline

Definition at line 791 of file MCContext.h.

◆ getGenDwarfSectionSyms()

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

◆ getGOFFSection()

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

◆ getInlineAsmLabel()

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

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

Definition at line 533 of file MCContext.h.

References Name.

◆ getInlineSourceManager()

SourceMgr * llvm::MCContext::getInlineSourceManager ( )
inline

Definition at line 438 of file MCContext.h.

◆ getLocInfos()

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

Definition at line 439 of file MCContext.h.

◆ getMachOSection() [1/2]

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

Definition at line 560 of file MCContext.h.

References getMachOSection().

◆ getMachOSection() [2/2]

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

◆ getMainFileName()

const std::string & llvm::MCContext::getMainFileName ( ) const
inline

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.

Definition at line 715 of file MCContext.h.

Referenced by setGenDwarfRootFile().

◆ getMCDwarfDirs()

const SmallVectorImpl< std::string > & llvm::MCContext::getMCDwarfDirs ( unsigned  CUID = 0)
inline

Definition at line 747 of file MCContext.h.

References llvm::MCDwarfLineTable::getMCDwarfDirs(), and getMCDwarfLineTable().

Referenced by EmitGenDwarfInfo().

◆ getMCDwarfFiles()

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

Definition at line 743 of file MCContext.h.

References llvm::MCDwarfLineTable::getMCDwarfFiles(), and getMCDwarfLineTable().

Referenced by EmitGenDwarfInfo().

◆ getMCDwarfLineTable() [1/2]

MCDwarfLineTable & llvm::MCContext::getMCDwarfLineTable ( unsigned  CUID)
inline

◆ getMCDwarfLineTable() [2/2]

const MCDwarfLineTable & llvm::MCContext::getMCDwarfLineTable ( unsigned  CUID) const
inline

Definition at line 737 of file MCContext.h.

References assert(), and I.

◆ getMCDwarfLineTables()

const std::map< unsigned, MCDwarfLineTable > & llvm::MCContext::getMCDwarfLineTables ( ) const
inline

Definition at line 729 of file MCContext.h.

Referenced by llvm::MCDwarfLineTable::emit().

◆ getMCGenDwarfLabelEntries()

const std::vector< MCGenDwarfLabelEntry > & llvm::MCContext::getMCGenDwarfLabelEntries ( ) const
inline

Definition at line 815 of file MCContext.h.

Referenced by EmitGenDwarfInfo().

◆ getMCPseudoProbeTable()

MCPseudoProbeTable & llvm::MCContext::getMCPseudoProbeTable ( )
inline

Definition at line 869 of file MCContext.h.

Referenced by llvm::MCPseudoProbeTable::emit().

◆ getObjectFileInfo()

const MCObjectFileInfo * llvm::MCContext::getObjectFileInfo ( ) const
inline

◆ getObjectFileType()

Environment llvm::MCContext::getObjectFileType ( ) const
inline

◆ getOrCreateFrameAllocSymbol()

MCSymbol * MCContext::getOrCreateFrameAllocSymbol ( const Twine FuncName,
unsigned  Idx 
)

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

Parameters
Idx- The index of a local variable passed to @llvm.localescape.

Definition at line 213 of file MCContext.cpp.

References getOrCreateSymbol(), llvm::MCAsmInfo::getPrivateGlobalPrefix(), and Idx.

◆ getOrCreateLSDASymbol()

MCSymbol * MCContext::getOrCreateLSDASymbol ( const Twine FuncName)

◆ getOrCreateParentFrameOffsetSymbol()

MCSymbol * MCContext::getOrCreateParentFrameOffsetSymbol ( const Twine FuncName)

Definition at line 219 of file MCContext.cpp.

References getOrCreateSymbol(), and llvm::MCAsmInfo::getPrivateGlobalPrefix().

Referenced by recoverFramePointer().

◆ getOrCreateSymbol()

MCSymbol * MCContext::getOrCreateSymbol ( const Twine Name)

Lookup the symbol inside with the specified Name.

If it exists, return it. If not, create a forward reference and return it.

Parameters
Name- The symbol name, which must be unique across all symbols.

Definition at line 200 of file MCContext.cpp.

References assert(), llvm::StringRef::empty(), Name, and Sym.

Referenced by llvm::MipsTargetLowering::AdjustInstrPostInstrSelection(), llvm::ModuloScheduleTestAnnotater::annotate(), llvm::MCSymbolRefExpr::create(), llvm::AVRAsmPrinter::doFinalization(), EmitCamlGlobal(), llvm::MipsTargetELFStreamer::emitDirectiveCpLoad(), llvm::X86AsmPrinter::emitEndOfAsmFile(), llvm::EHStreamer::emitExceptionTable(), llvm::ARMAsmPrinter::emitFunctionEntryLabel(), llvm::AsmPrinter::emitGlobalVariable(), llvm::X86AsmPrinter::emitKCFITypeId(), llvm::CSKYAsmPrinter::emitMachineConstantPoolValue(), llvm::AsmPrinter::emitSpecialLLVMGlobal(), llvm::AVRAsmPrinter::emitStartOfAsmFile(), llvm::X86AsmPrinter::emitStartOfAsmFile(), llvm::AVRAsmPrinter::emitXXStructor(), llvm::RecordStreamer::flushSymverDirectives(), getBFLabel(), llvm::TargetLoweringObjectFileELF::getCFIPersonalitySymbol(), getCOFFSection(), llvm::LanaiMCInstLower::GetConstantPoolIndexSymbol(), llvm::MSP430MCInstLower::GetConstantPoolIndexSymbol(), llvm::AsmPrinter::GetCPISymbol(), llvm::ARMAsmPrinter::GetCPISymbol(), llvm::MCStreamer::getDwarfLineTableSymbol(), llvm::MachineBasicBlock::getEHCatchretSymbol(), llvm::TargetLoweringObjectFileXCOFF::getEHInfoTableSymbol(), getELFSection(), llvm::MachineBasicBlock::getEndSymbol(), llvm::AsmPrinter::GetExternalSymbolSymbol(), llvm::TargetLoweringObjectFileXCOFF::getFunctionEntryPointSymbol(), llvm::NVPTXAsmPrinter::getFunctionFrameSymbol(), llvm::PPCFunctionInfo::getGlobalEPSymbol(), llvm::AArch64MCInstLower::GetGlobalValueSymbol(), llvm::MachineFunction::getJTISymbol(), llvm::AsmPrinter::GetJTSetSymbol(), llvm::LanaiMCInstLower::GetJumpTableSymbol(), llvm::MSP430MCInstLower::GetJumpTableSymbol(), llvm::PPCFunctionInfo::getLocalEPSymbol(), getMCSymbolForMBB(), getOrCreateFrameAllocSymbol(), llvm::WebAssembly::getOrCreateFuncrefCallTableSymbol(), llvm::WebAssembly::getOrCreateFunctionTableSymbol(), getOrCreateLSDASymbol(), getOrCreateParentFrameOffsetSymbol(), llvm::MachineFunction::getPICBaseSymbol(), getPICLabel(), llvm::PPCFunctionInfo::getPICOffsetSymbol(), llvm::MachineBasicBlock::getSymbol(), llvm::TargetMachine::getSymbol(), llvm::M68kMCInstLower::GetSymbolFromOperand(), GetSymbolFromOperand(), llvm::TargetLoweringObjectFile::getSymbolWithGlobalValueBase(), llvm::PPCFunctionInfo::getTOCOffsetSymbol(), getWasmSection(), getXCOFFSection(), llvm::FastISel::lowerCallTo(), llvm::VETargetLowering::LowerCustomJumpTableEntry(), AMDGPUMCInstLower::lowerOperand(), llvm::MCParserUtils::parseAssignmentExpression(), llvm::MCAsmParserExtension::ParseDirectiveCGProfile(), llvm::FaultMaps::serializeToFaultMapSection(), llvm::StackMaps::serializeToStackMapSection(), llvm::FastISel::CallLoweringInfo::setCallee(), setSymbolValue(), smallData(), llvm::AMDGPUSymbolizer::tryAddingSymbolicOperand(), llvm::MCExternalSymbolizer::tryAddingSymbolicOperand(), and llvm::AArch64ExternalSymbolizer::tryAddingSymbolicOperand().

◆ getRegisterInfo()

const MCRegisterInfo * llvm::MCContext::getRegisterInfo ( ) const
inline

◆ getSecureLog()

raw_fd_ostream * llvm::MCContext::getSecureLog ( )
inline

Definition at line 838 of file MCContext.h.

◆ getSecureLogFile()

StringRef llvm::MCContext::getSecureLogFile ( )
inline

Definition at line 837 of file MCContext.h.

◆ getSecureLogUsed()

bool llvm::MCContext::getSecureLogUsed ( )
inline

Definition at line 844 of file MCContext.h.

◆ getSourceManager()

const SourceMgr * llvm::MCContext::getSourceManager ( ) const
inline

◆ getSPIRVSection()

MCSectionSPIRV * MCContext::getSPIRVSection ( )

Definition at line 849 of file MCContext.cpp.

References F, and llvm::SectionKind::getText().

◆ getSubtargetCopy()

MCSubtargetInfo & MCContext::getSubtargetCopy ( const MCSubtargetInfo STI)

Definition at line 884 of file MCContext.cpp.

Referenced by llvm::MCTargetAsmParser::copySTI().

◆ getSubtargetInfo()

const MCSubtargetInfo * llvm::MCContext::getSubtargetInfo ( ) const
inline

Definition at line 452 of file MCContext.h.

Referenced by llvm::CSKYConstantPool::emitAll().

◆ getSwift5ReflectionSegmentName()

const StringRef & llvm::MCContext::getSwift5ReflectionSegmentName ( ) const
inline

Definition at line 431 of file MCContext.h.

◆ getSymbols()

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

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.

Definition at line 529 of file MCContext.h.

Referenced by llvm::WebAssemblyAsmPrinter::emitDecls().

◆ getTargetOptions()

const MCTargetOptions * llvm::MCContext::getTargetOptions ( ) const
inline

Definition at line 454 of file MCContext.h.

Referenced by getRelocType32(), and getRelocType64().

◆ getTargetTriple()

const Triple & llvm::MCContext::getTargetTriple ( ) const
inline

◆ getWasmSection() [1/5]

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

Definition at line 653 of file MCContext.h.

References getWasmSection().

◆ getWasmSection() [2/5]

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

◆ getWasmSection() [3/5]

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

Definition at line 658 of file MCContext.h.

References getWasmSection().

◆ getWasmSection() [4/5]

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

◆ getWasmSection() [5/5]

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

◆ getXCOFFSection()

MCSectionXCOFF * MCContext::getXCOFFSection ( StringRef  Section,
SectionKind  K,
std::optional< XCOFF::CsectProperties CsectProp = std::nullopt,
bool  MultiSymbolsAllowed = false,
const char BeginSymName = nullptr,
std::optional< XCOFF::DwarfSectionSubtypeFlags DwarfSubtypeFlags = std::nullopt 
)

◆ hadError()

bool llvm::MCContext::hadError ( )
inline

Definition at line 853 of file MCContext.h.

Referenced by llvm::MCAssembler::layout().

◆ hasXCOFFSection()

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

Definition at line 773 of file MCContext.cpp.

References llvm::XCOFF::CsectProperties::MappingClass.

◆ initInlineSourceManager()

void MCContext::initInlineSourceManager ( )

Definition at line 125 of file MCContext.cpp.

◆ isDwarfMD5UsageConsistent()

bool llvm::MCContext::isDwarfMD5UsageConsistent ( unsigned  CUID) const
inline

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

Definition at line 766 of file MCContext.h.

References getMCDwarfLineTable(), and llvm::MCDwarfLineTable::isMD5UsageConsistent().

◆ isELFGenericMergeableSection()

bool MCContext::isELFGenericMergeableSection ( StringRef  Name)

◆ isELFImplicitMergeableSectionNamePrefix()

bool MCContext::isELFImplicitMergeableSectionNamePrefix ( StringRef  Name)

Definition at line 630 of file MCContext.cpp.

Referenced by calcUniqueIDUpdateFlagsAndSize(), and isELFGenericMergeableSection().

◆ isValidDwarfFileNumber()

bool MCContext::isValidDwarfFileNumber ( unsigned  FileNumber,
unsigned  CUID = 0 
)

isValidDwarfFileNumber - takes a dwarf file number and returns true if it currently is assigned and false otherwise.

Definition at line 992 of file MCContext.cpp.

References getDwarfVersion(), llvm::MCDwarfLineTable::getMCDwarfFiles(), and getMCDwarfLineTable().

◆ lookupMacro()

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

Definition at line 858 of file MCContext.h.

References I, and Name.

◆ lookupSymbol()

MCSymbol * MCContext::lookupSymbol ( const Twine Name) const

◆ operator=()

MCContext & llvm::MCContext::operator= ( const MCContext )
delete

◆ recordELFMergeableSectionInfo()

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

Definition at line 614 of file MCContext.cpp.

References GenericSectionID, isELFGenericMergeableSection(), and llvm::ELF::SHF_MERGE.

Referenced by getELFSection().

◆ registerInlineAsmLabel()

void MCContext::registerInlineAsmLabel ( MCSymbol Sym)

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

Definition at line 374 of file MCContext.cpp.

References Sym.

Referenced by EmitInlineAsmStr().

◆ remapDebugPath()

void MCContext::remapDebugPath ( SmallVectorImpl< char > &  Path)

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

Definition at line 893 of file MCContext.cpp.

References From, llvm::sys::path::replace_path_prefix(), and llvm::reverse().

Referenced by RemapDebugPaths().

◆ RemapDebugPaths()

void MCContext::RemapDebugPaths ( )

◆ reportError()

void MCContext::reportError ( SMLoc  L,
const Twine Msg 
)

Definition at line 1064 of file MCContext.cpp.

References D, llvm::SourceMgr::DK_Error, and llvm::SourceMgr::GetMessage().

Referenced by llvm::ARMAsmBackend::adjustFixupValue(), adjustFixupValue(), ARM64EmitUnwindInfo(), ARMEmitUnwindInfo(), llvm::MCObjectStreamer::changeSectionImpl(), checkARM64Instructions(), checkARMInstructions(), llvm::MCStreamer::checkCVLocSection(), checkIs32(), checkIs64(), llvm::MCAssembler::computeFragmentSize(), llvm::MCStreamer::emitCFIStartProc(), llvm::MCStreamer::emitCVInlineSiteIdDirective(), llvm::AMDGPUAsmPrinter::emitFunctionBodyStart(), llvm::AsmPrinter::emitGlobalVariable(), llvm::AMDGPUAsmPrinter::emitGlobalVariable(), llvm::MCObjectStreamer::emitInstruction(), llvm::MCStreamer::emitLabel(), llvm::MCELFStreamer::emitSymbolAttribute(), llvm::MCObjectStreamer::emitValueImpl(), llvm::MCStreamer::emitWinCFIAllocStack(), llvm::MCStreamer::emitWinCFIEndChained(), llvm::MCStreamer::emitWinCFIEndProc(), llvm::MCStreamer::emitWinCFIFuncletOrFuncEnd(), llvm::MCStreamer::emitWinCFIPushFrame(), llvm::MCStreamer::emitWinCFISaveReg(), llvm::MCStreamer::emitWinCFISaveXMM(), llvm::MCStreamer::emitWinCFISetFrame(), llvm::MCStreamer::emitWinCFIStartProc(), llvm::MCStreamer::emitWinEHHandler(), llvm::MCStreamer::emitWinEHHandlerData(), llvm::MCStreamer::EnsureValidWinFrameInfo(), extractBitsForFixup(), llvm::MCStreamer::finish(), fixupLeb128(), getAbsoluteReloc(), llvm::MCAsmLayout::getBaseSymbol(), llvm::MipsMCCodeEmitter::getExprOpValue(), llvm::WebAssembly::getOrCreateFuncrefCallTableSymbol(), llvm::WebAssembly::getOrCreateFunctionTableSymbol(), getPCRelReloc(), getPLTReloc(), getRelocType32(), getRelocType64(), getTLSGDReloc(), getTLSLDMReloc(), getTLSLDOReloc(), getTLSLEReloc(), isNonILP32reloc(), llvm::HexagonMCChecker::reportError(), llvm::HexagonShuffler::reportError(), reportOutOfRangeError(), reportWarning(), llvm::AVRTargetObjectFile::SelectSectionForGlobal(), and llvm::MCAssembler::writeSectionData().

◆ reportWarning()

void MCContext::reportWarning ( SMLoc  L,
const Twine Msg 
)

◆ reset()

void MCContext::reset ( )

◆ setAllowTemporaryLabels()

void llvm::MCContext::setAllowTemporaryLabels ( bool  Value)
inline

Definition at line 458 of file MCContext.h.

Referenced by llvm::LLVMTargetMachine::addPassesToEmitMC().

◆ setCompilationDir()

void llvm::MCContext::setCompilationDir ( StringRef  S)
inline

Set the compilation directory for DW_AT_comp_dir.

Definition at line 701 of file MCContext.h.

References llvm::StringRef::str().

◆ setCurrentDwarfLoc()

void llvm::MCContext::setCurrentDwarfLoc ( unsigned  FileNum,
unsigned  Line,
unsigned  Column,
unsigned  Flags,
unsigned  Isa,
unsigned  Discriminator 
)
inline

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.

Definition at line 774 of file MCContext.h.

References llvm::MCDwarfLoc::setColumn(), llvm::MCDwarfLoc::setDiscriminator(), llvm::MCDwarfLoc::setFileNum(), llvm::MCDwarfLoc::setFlags(), llvm::MCDwarfLoc::setIsa(), and llvm::MCDwarfLoc::setLine().

Referenced by llvm::MCStreamer::emitDwarfLocDirective().

◆ setDiagnosticHandler()

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

◆ setDwarfCompileUnitID()

void llvm::MCContext::setDwarfCompileUnitID ( unsigned  CUIndex)
inline

Definition at line 753 of file MCContext.h.

◆ setDwarfDebugFlags()

void llvm::MCContext::setDwarfDebugFlags ( StringRef  S)
inline

Definition at line 823 of file MCContext.h.

◆ setDwarfDebugProducer()

void llvm::MCContext::setDwarfDebugProducer ( StringRef  S)
inline

Definition at line 826 of file MCContext.h.

◆ setDwarfFormat()

void llvm::MCContext::setDwarfFormat ( dwarf::DwarfFormat  f)
inline

Definition at line 829 of file MCContext.h.

◆ setDwarfVersion()

void llvm::MCContext::setDwarfVersion ( uint16_t  v)
inline

Definition at line 832 of file MCContext.h.

◆ setGenDwarfFileNumber()

void llvm::MCContext::setGenDwarfFileNumber ( unsigned  FileNumber)
inline

Definition at line 797 of file MCContext.h.

◆ setGenDwarfForAssembly()

void llvm::MCContext::setGenDwarfForAssembly ( bool  Value)
inline

Definition at line 792 of file MCContext.h.

◆ setGenDwarfRootFile()

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

◆ setMainFileName()

void llvm::MCContext::setMainFileName ( StringRef  S)
inline

Set the main file name and override the default.

Definition at line 718 of file MCContext.h.

◆ setMCLineTableRootFile()

void llvm::MCContext::setMCLineTableRootFile ( unsigned  CUID,
StringRef  CompilationDir,
StringRef  Filename,
std::optional< MD5::MD5Result Checksum,
std::optional< StringRef Source 
)
inline

Specifies the "root" file and directory of the compilation unit.

These are "file 0" and "directory 0" in DWARF v5.

Definition at line 757 of file MCContext.h.

References getMCDwarfLineTable(), and llvm::MCDwarfLineTable::setRootFile().

Referenced by llvm::MCStreamer::emitDwarfFile0Directive(), and setGenDwarfRootFile().

◆ setObjectFileInfo()

void llvm::MCContext::setObjectFileInfo ( const MCObjectFileInfo Mofi)
inline

◆ setSecureLog()

void llvm::MCContext::setSecureLog ( std::unique_ptr< raw_fd_ostream Value)
inline

Definition at line 840 of file MCContext.h.

◆ setSecureLogUsed()

void llvm::MCContext::setSecureLogUsed ( bool  Value)
inline

Definition at line 845 of file MCContext.h.

◆ setSymbolValue()

void MCContext::setSymbolValue ( MCStreamer Streamer,
const Twine Sym,
uint64_t  Val 
)

Set value for a symbol.

Definition at line 368 of file MCContext.cpp.

References llvm::MCConstantExpr::create(), llvm::MCStreamer::emitAssignment(), getOrCreateSymbol(), and Sym.

◆ setUseNamesOnTempLabels()

void llvm::MCContext::setUseNamesOnTempLabels ( bool  Value)
inline

Definition at line 459 of file MCContext.h.

◆ undefineMacro()

void llvm::MCContext::undefineMacro ( StringRef  Name)
inline

Definition at line 867 of file MCContext.h.

References Name.


The documentation for this class was generated from the following files: