LLVM 17.0.0git
|
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 | |
MCContext & | operator= (const MCContext &)=delete |
~MCContext () | |
Environment | getObjectFileType () const |
const StringRef & | getSwift5ReflectionSegmentName () const |
const Triple & | getTargetTriple () const |
const SourceMgr * | getSourceManager () const |
void | initInlineSourceManager () |
SourceMgr * | getInlineSourceManager () |
std::vector< const MDNode * > & | getLocInfos () |
void | setDiagnosticHandler (DiagHandlerTy DiagHandler) |
void | setObjectFileInfo (const MCObjectFileInfo *Mofi) |
const MCAsmInfo * | getAsmInfo () const |
const MCRegisterInfo * | getRegisterInfo () const |
const MCObjectFileInfo * | getObjectFileInfo () const |
const MCSubtargetInfo * | getSubtargetInfo () const |
CodeViewContext & | getCVContext () |
void | setAllowTemporaryLabels (bool Value) |
void | setUseNamesOnTempLabels (bool Value) |
StringRef | getSecureLogFile () |
raw_fd_ostream * | getSecureLog () |
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 MCAsmMacro * | lookupMacro (StringRef Name) |
void | defineMacro (StringRef Name, MCAsmMacro Macro) |
void | undefineMacro (StringRef Name) |
MCPseudoProbeTable & | getMCPseudoProbeTable () |
Module Lifetime Management | |
void | reset () |
reset - return object to right after construction state to prepare to process a new module | |
McInst Management | |
MCInst * | createMCInst () |
Create and return a new MC instruction. | |
Symbol Management | |
MCSymbol * | createLinkerPrivateTempSymbol () |
Create and return a new linker temporary symbol with a unique but unspecified name. | |
MCSymbol * | createTempSymbol () |
Create a temporary symbol with a unique name. | |
MCSymbol * | createTempSymbol (const Twine &Name, bool AlwaysAddSuffix=true) |
MCSymbol * | createNamedTempSymbol () |
Create a temporary symbol with a unique name whose name cannot be omitted in the symbol table. | |
MCSymbol * | createNamedTempSymbol (const Twine &Name) |
MCSymbol * | createDirectionalLocalSymbol (unsigned LocalLabelVal) |
Create the definition of a directional local symbol for numbered label (used for "1:" definitions). | |
MCSymbol * | getDirectionalLocalSymbol (unsigned LocalLabelVal, bool Before) |
Create and return a directional local symbol for numbered label (used for "1b" or 1f" references). | |
MCSymbol * | getOrCreateSymbol (const Twine &Name) |
Lookup the symbol inside with the specified Name . | |
MCSymbol * | getOrCreateFrameAllocSymbol (const Twine &FuncName, unsigned Idx) |
Gets a symbol that will be defined to the final stack offset of a local variable after codegen. | |
MCSymbol * | getOrCreateParentFrameOffsetSymbol (const Twine &FuncName) |
MCSymbol * | getOrCreateLSDASymbol (const Twine &FuncName) |
MCSymbol * | lookupSymbol (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 SymbolTable & | getSymbols () const |
getSymbols - Get a reference for the symbol table for clients that want to, for example, iterate over all symbols. | |
MCSymbol * | getInlineAsmLabel (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< unsigned > | 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. | |
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 |
MCDwarfLineTable & | getMCDwarfLineTable (unsigned CUID) |
const MCDwarfLineTable & | getMCDwarfLineTable (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 MCDwarfLoc & | getCurrentDwarfLoc () |
bool | getGenDwarfForAssembly () |
void | setGenDwarfForAssembly (bool Value) |
unsigned | getGenDwarfFileNumber () |
EmitDwarfUnwindType | emitDwarfUnwindInfo () 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 |
Context object for machine code objects.
This class owns all of the sections that it creates.
Definition at line 76 of file MCContext.h.
using llvm::MCContext::DiagHandlerTy = std::function<void(const SMDiagnostic &, bool, const SourceMgr &, std::vector<const MDNode *> &)> |
Definition at line 79 of file MCContext.h.
using llvm::MCContext::SymbolTable = StringMap<MCSymbol *, BumpPtrAllocator &> |
Definition at line 78 of file MCContext.h.
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 542 of file MCContext.h.
Enumerator | |
---|---|
IsMachO | |
IsELF | |
IsGOFF | |
IsCOFF | |
IsSPIRV | |
IsWasm | |
IsXCOFF | |
IsDXContainer |
Definition at line 82 of file MCContext.h.
|
explicit |
Definition at line 67 of file MCContext.cpp.
References Allocator, llvm::Triple::COFF, llvm::Triple::DXContainer, llvm::Triple::ELF, llvm::MemoryBuffer::getBufferIdentifier(), llvm::SourceMgr::getMainFileID(), llvm::SourceMgr::getMemoryBuffer(), llvm::SourceMgr::getNumBuffers(), llvm::Triple::getObjectFormat(), llvm::Triple::GOFF, IsCOFF, IsDXContainer, IsELF, IsGOFF, IsMachO, llvm::Triple::isOSWindows(), IsSPIRV, IsWasm, IsXCOFF, llvm::Triple::MachO, llvm::report_fatal_error(), llvm::Triple::SPIRV, llvm::Triple::UnknownObjectFormat, llvm::Triple::Wasm, and llvm::Triple::XCOFF.
MCContext::~MCContext | ( | ) |
Definition at line 118 of file MCContext.cpp.
References reset().
Add an entry to the debug prefix map.
Definition at line 879 of file MCContext.cpp.
References llvm::SmallVectorImpl< T >::emplace_back(), and From.
Definition at line 804 of file MCContext.h.
References llvm::SetVector< T, Vector, Set >::insert().
|
inline |
Definition at line 814 of file MCContext.h.
References E.
Referenced by llvm::MCGenDwarfLabelEntry::Make().
Definition at line 842 of file MCContext.h.
|
inline |
Definition at line 782 of file MCContext.h.
Referenced by llvm::MCObjectStreamer::changeSectionImpl(), and llvm::MCDwarfLineEntry::make().
Create the definition of a directional local symbol for numbered label (used for "1:" definitions).
Definition at line 346 of file MCContext.cpp.
MCSectionELF * MCContext::createELFGroupSection | ( | const MCSymbolELF * | Group, |
bool | IsComdat | ||
) |
Definition at line 604 of file MCContext.cpp.
References llvm::SectionKind::getReadOnly(), llvm::MCSection::NonUniqueID, and llvm::ELF::SHT_GROUP.
MCSectionELF * MCContext::createELFRelSection | ( | const Twine & | Name, |
unsigned | Type, | ||
unsigned | Flags, | ||
unsigned | EntrySize, | ||
const MCSymbolELF * | Group, | ||
const MCSectionELF * | RelInfoSection | ||
) |
Definition at line 501 of file MCContext.cpp.
References Flags, llvm::MCSection::getBeginSymbol(), llvm::SectionKind::getReadOnly(), I, llvm::StringMap< ValueTy, AllocatorTy >::insert(), and Name.
MCSymbol * MCContext::createLinkerPrivateTempSymbol | ( | ) |
Create and return a new linker temporary symbol with a unique but unspecified name.
Definition at line 312 of file MCContext.cpp.
References llvm::MCAsmInfo::getLinkerPrivateGlobalPrefix().
Referenced by llvm::AsmPrinter::emitKCFITrapEntry().
MCInst * MCContext::createMCInst | ( | ) |
Create and return a new MC instruction.
Definition at line 193 of file MCContext.cpp.
Referenced by llvm::HexagonLowerToMC().
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 320 of file MCContext.cpp.
References createNamedTempSymbol().
Referenced by createNamedTempSymbol(), and llvm::AddrLabelMap::getAddrLabelSymbolToEmit().
Definition at line 306 of file MCContext.cpp.
References llvm::MCAsmInfo::getPrivateGlobalPrefix(), and Name.
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 318 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::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().
Definition at line 300 of file MCContext.cpp.
References llvm::MCAsmInfo::getPrivateGlobalPrefix(), and Name.
|
inline |
Definition at line 846 of file MCContext.h.
|
inline |
Definition at line 858 of file MCContext.h.
References llvm::Macro, and Name.
void MCContext::diagnose | ( | const SMDiagnostic & | SMD | ) |
Definition at line 1004 of file MCContext.cpp.
References assert(), and llvm_unreachable.
EmitDwarfUnwindType MCContext::emitDwarfUnwindInfo | ( | ) | const |
Definition at line 919 of file MCContext.cpp.
References llvm::Default.
void MCContext::finalizeDwarfSections | ( | MCStreamer & | MCOS | ) |
Remove empty sections from SectionsForRanges, to avoid generating useless debug info for them.
Definition at line 989 of file MCContext.cpp.
References llvm::MCStreamer::mayHaveInstructions().
Referenced by llvm::MCGenDwarfInfo::Emit().
Definition at line 446 of file MCContext.h.
Referenced by llvm::DwarfCFIException::beginFunction(), calcUniqueIDUpdateFlagsAndSize(), llvm::MCTargetStreamer::changeSection(), llvm::MCSymbolRefExpr::create(), llvm::MCGenDwarfInfo::Emit(), llvm::MCDwarfLineTableHeader::Emit(), llvm::MCStreamer::emitCFIStartProc(), llvm::MCObjectStreamer::emitDwarfLineEndEntry(), emitFDESymbol(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), emitGenDwarfRanges(), llvm::ARMTargetStreamer::emitInst(), llvm::MCStreamer::emitIntValue(), llvm::mcdwarf::emitListsTableHeaderStart(), llvm::MCDwarfLineTable::emitOne(), EmitPersonality(), llvm::MCTargetStreamer::emitRawBytes(), llvm::NVPTXTargetStreamer::emitRawBytes(), llvm::MCTargetStreamer::emitValue(), llvm::MCStreamer::emitWinCFIStartProc(), llvm::MCStreamer::EnsureValidWinFrameInfo(), getDataAlignmentFactor(), llvm::MCStreamer::getDwarfLineTableSymbol(), llvm::MachineBasicBlock::getEndSymbol(), getRelocType32(), getRelocType64(), getSizeForEncoding(), llvm::MachineBasicBlock::getSymbol(), llvm::TargetLoweringObjectFileELF::Initialize(), llvm::MCELFStreamer::initSections(), llvm::MCDwarfLineStr::MCDwarfLineStr(), llvm::RISCVAsmBackend::relaxDwarfCFA(), selectELFSectionForGlobal(), and selectExplicitSectionGlobal().
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 697 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().
|
inline |
Definition at line 684 of file MCContext.h.
Referenced by llvm::MachineBasicBlock::getBBIDOrNumber().
MCSectionCOFF * MCContext::getCOFFSection | ( | StringRef | Section, |
unsigned | Characteristics, | ||
SectionKind | Kind, | ||
const char * | BeginSymName = nullptr |
||
) |
Definition at line 689 of file MCContext.cpp.
References Characteristics, GenericSectionID, and getCOFFSection().
MCSectionCOFF * MCContext::getCOFFSection | ( | StringRef | Section, |
unsigned | Characteristics, | ||
SectionKind | Kind, | ||
StringRef | COMDATSymName, | ||
int | Selection, | ||
unsigned | UniqueID = GenericSectionID , |
||
const char * | BeginSymName = nullptr |
||
) |
Definition at line 658 of file MCContext.cpp.
References Characteristics, createTempSymbol(), llvm::StringRef::empty(), llvm::MCSymbol::getName(), getOrCreateSymbol(), and Selection.
Referenced by llvm::AsmPrinter::doFinalization(), getAssociativeCOFFSection(), getCOFFSection(), getCOFFStaticStructorSection(), llvm::TargetLoweringObjectFileCOFF::getExplicitSectionGlobal(), llvm::TargetLoweringObjectFileCOFF::getSectionForConstant(), llvm::TargetLoweringObjectFileCOFF::getSectionForJumpTable(), llvm::TargetLoweringObjectFileCOFF::Initialize(), and llvm::TargetLoweringObjectFileCOFF::SelectSectionForGlobal().
|
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 694 of file MCContext.h.
Referenced by EmitGenDwarfAbbrev(), EmitGenDwarfInfo(), and setGenDwarfRootFile().
|
inline |
Definition at line 785 of file MCContext.h.
Referenced by llvm::MCDwarfLineEntry::make().
CodeViewContext & MCContext::getCVContext | ( | ) |
Definition at line 994 of file MCContext.cpp.
Referenced by llvm::MCStreamer::checkCVLocSection(), llvm::MCObjectStreamer::emitCVDefRangeDirective(), llvm::MCObjectStreamer::emitCVFileChecksumOffsetDirective(), llvm::MCObjectStreamer::emitCVFileChecksumsDirective(), llvm::MCStreamer::emitCVFileDirective(), llvm::MCStreamer::emitCVFuncIdDirective(), llvm::MCObjectStreamer::emitCVInlineLinetableDirective(), llvm::MCStreamer::emitCVInlineSiteIdDirective(), llvm::MCObjectStreamer::emitCVLinetableDirective(), llvm::MCObjectStreamer::emitCVLocDirective(), and llvm::MCObjectStreamer::emitCVStringTableDirective().
Create and return a directional local symbol for numbered label (used for "1b" or 1f" references).
Definition at line 351 of file MCContext.cpp.
|
inline |
Definition at line 747 of file MCContext.h.
Referenced by llvm::MCDwarfLineEntry::make().
|
inline |
Definition at line 819 of file MCContext.h.
Referenced by EmitGenDwarfAbbrev(), and EmitGenDwarfInfo().
|
inline |
Definition at line 822 of file MCContext.h.
Referenced by EmitGenDwarfInfo().
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 966 of file MCContext.cpp.
References llvm::MCDwarfLineTable::tryGetFile().
Referenced by llvm::MCStreamer::tryEmitDwarfFileDirective().
|
inline |
Definition at line 825 of file MCContext.h.
Referenced by llvm::MCDwarfLineTableHeader::Emit(), llvm::DwarfDebug::emitDebugLocEntry(), EmitGenDwarfAbbrev(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), llvm::mcdwarf::emitListsTableHeaderStart(), and llvm::MCDwarfLineStr::emitRef().
|
inline |
Definition at line 784 of file MCContext.h.
Referenced by llvm::MCDwarfLineEntry::make().
|
inline |
Definition at line 828 of file MCContext.h.
Referenced by llvm::MCGenDwarfInfo::Emit(), llvm::MCDwarfLineTable::emit(), llvm::MCDwarfLineTableHeader::Emit(), EmitGenDwarfAbbrev(), EmitGenDwarfInfo(), emitGenDwarfRanges(), llvm::mcdwarf::emitListsTableHeaderStart(), llvm::MCDwarfLineTable::emitOne(), isValidDwarfFileNumber(), and setGenDwarfRootFile().
MCSectionDXContainer * MCContext::getDXContainerSection | ( | StringRef | Section, |
SectionKind | K | ||
) |
Get the section for the provided Section name.
Definition at line 852 of file MCContext.cpp.
Referenced by DXILTargetObjectFile::getExplicitSectionGlobal().
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 513 of file MCContext.cpp.
References Flags, and getELFSection().
Referenced by llvm::TargetLoweringObjectFileELF::emitPersonalityValue().
|
inline |
Definition at line 563 of file MCContext.h.
References Flags, and 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().
|
inline |
Definition at line 568 of file MCContext.h.
References Flags, getELFSection(), and llvm::MCSection::NonUniqueID.
MCSectionELF * MCContext::getELFSection | ( | const Twine & | Section, |
unsigned | Type, | ||
unsigned | Flags, | ||
unsigned | EntrySize, | ||
const MCSymbolELF * | Group, | ||
bool | IsComdat, | ||
unsigned | UniqueID, | ||
const MCSymbolELF * | LinkedToSym | ||
) |
Definition at line 534 of file MCContext.cpp.
References assert(), llvm::StringSwitch< T, R >::Case(), llvm::StringSwitch< T, R >::Default(), llvm::StringRef::empty(), Flags, llvm::SectionKind::getBSS(), llvm::SectionKind::getData(), llvm::SectionKind::getExecuteOnly(), llvm::SectionKind::getMetadata(), llvm::MCSymbol::getName(), llvm::SectionKind::getReadOnly(), llvm::SectionKind::getReadOnlyWithRel(), llvm::SectionKind::getText(), llvm::SectionKind::getThreadBSS(), llvm::SectionKind::getThreadData(), recordELFMergeableSectionInfo(), llvm::ELF::SHF_ARM_PURECODE, llvm::ELF::SHF_EXECINSTR, llvm::ELF::SHF_TLS, llvm::ELF::SHF_WRITE, llvm::ELF::SHT_NOBITS, and llvm::StringSwitch< T, R >::StartsWith().
|
inline |
Definition at line 574 of file MCContext.h.
References Flags, getELFSection(), and llvm::MCSection::NonUniqueID.
MCSectionELF * MCContext::getELFSection | ( | const Twine & | Section, |
unsigned | Type, | ||
unsigned | Flags, | ||
unsigned | EntrySize, | ||
const Twine & | Group, | ||
bool | IsComdat, | ||
unsigned | UniqueID, | ||
const MCSymbolELF * | LinkedToSym | ||
) |
Definition at line 521 of file MCContext.cpp.
References Flags, getELFSection(), getOrCreateSymbol(), llvm::Twine::isTriviallyEmpty(), and llvm::Twine::str().
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 638 of file MCContext.cpp.
Referenced by calcUniqueIDUpdateFlagsAndSize().
|
inline |
Definition at line 789 of file MCContext.h.
Referenced by llvm::MCGenDwarfLabelEntry::Make().
|
inline |
Definition at line 787 of file MCContext.h.
Definition at line 800 of file MCContext.h.
Referenced by llvm::MCGenDwarfInfo::Emit(), EmitGenDwarfAbbrev(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), emitGenDwarfRanges(), and llvm::MCGenDwarfLabelEntry::Make().
MCSectionGOFF * MCContext::getGOFFSection | ( | StringRef | Section, |
SectionKind | Kind, | ||
MCSection * | Parent, | ||
const MCExpr * | SubsectionId | ||
) |
Definition at line 646 of file MCContext.cpp.
Referenced by llvm::TargetLoweringObjectFileGOFF::SelectSectionForGlobal().
isInlineAsmLabel - Return true if the name is a label referenced in inline assembly.
Definition at line 529 of file MCContext.h.
References Name.
|
inline |
Definition at line 438 of file MCContext.h.
Definition at line 439 of file MCContext.h.
|
inline |
Definition at line 556 of file MCContext.h.
References getMachOSection().
MCSectionMachO * MCContext::getMachOSection | ( | StringRef | Segment, |
StringRef | Section, | ||
unsigned | TypeAndAttributes, | ||
unsigned | Reserved2, | ||
SectionKind | K, | ||
const char * | BeginSymName = nullptr |
||
) |
Return the MCSection for the specified mach-o section.
This requires the operands to be valid.
Definition at line 434 of file MCContext.cpp.
References assert(), createTempSymbol(), and Name.
Referenced by llvm::TargetLoweringObjectFileMachO::emitModuleMetadata(), emitNonLazyStubs(), llvm::AsmPrinter::emitXRayTable(), llvm::TargetLoweringObjectFileMachO::getExplicitSectionGlobal(), getMachOSection(), and llvm::TargetLoweringObjectFileMachO::Initialize().
|
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 711 of file MCContext.h.
Referenced by setGenDwarfRootFile().
|
inline |
Definition at line 743 of file MCContext.h.
References llvm::MCDwarfLineTable::getMCDwarfDirs(), and getMCDwarfLineTable().
Referenced by EmitGenDwarfInfo().
|
inline |
Definition at line 739 of file MCContext.h.
References llvm::MCDwarfLineTable::getMCDwarfFiles(), and getMCDwarfLineTable().
Referenced by EmitGenDwarfInfo().
|
inline |
Definition at line 729 of file MCContext.h.
Referenced by EmitGenDwarfInfo(), llvm::MCStreamer::getDwarfLineTableSymbol(), getMCDwarfDirs(), getMCDwarfFiles(), isDwarfMD5UsageConsistent(), isValidDwarfFileNumber(), llvm::MCDwarfLineEntry::make(), and setMCLineTableRootFile().
|
inline |
Definition at line 733 of file MCContext.h.
|
inline |
Definition at line 725 of file MCContext.h.
Referenced by llvm::MCDwarfLineTable::emit().
|
inline |
Definition at line 810 of file MCContext.h.
Referenced by EmitGenDwarfInfo().
|
inline |
Definition at line 864 of file MCContext.h.
Referenced by llvm::MCPseudoProbeTable::emit().
|
inline |
Definition at line 450 of file MCContext.h.
Referenced by llvm::NVPTXTargetStreamer::changeSection(), llvm::MCPseudoProbeSections::emit(), llvm::MCGenDwarfInfo::Emit(), llvm::MCDwarfLineTable::emit(), llvm::MCWinCOFFStreamer::emitCOFFSafeSEH(), llvm::MCWinCOFFStreamer::emitCommonSymbol(), llvm::SystemZTargetStreamer::emitConstantPools(), llvm::MCObjectStreamer::emitDwarfLineEndEntry(), llvm::MipsAsmPrinter::emitEndOfAsmFile(), EmitGenDwarfAbbrev(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), emitGenDwarfRanges(), llvm::MCWinCOFFStreamer::emitLocalCommonSymbol(), llvm::AsmPrinter::emitRemarksSection(), llvm::MCDwarfLineStr::emitSection(), llvm::MipsAsmPrinter::emitStartOfAsmFile(), llvm::X86FrameLowering::enableShrinkWrapping(), llvm::WinCFGuard::endModule(), llvm::WinException::endModule(), llvm::MipsTargetELFStreamer::finish(), llvm::MCELFStreamer::initSections(), llvm::MCDwarfLineStr::MCDwarfLineStr(), llvm::MipsTargetELFStreamer::MipsTargetELFStreamer(), llvm::TargetLoweringObjectFileGOFF::SelectSectionForGlobal(), llvm::FaultMaps::serializeToFaultMapSection(), llvm::StackMaps::serializeToStackMapSection(), and llvm::write().
|
inline |
Definition at line 429 of file MCContext.h.
Referenced by llvm::MCObjectFileInfo::getBBAddrMapSection(), llvm::MCObjectFileInfo::getKCFITrapSection(), llvm::MCObjectFileInfo::getPCSection(), llvm::MCObjectFileInfo::getPseudoProbeDescSection(), llvm::MCObjectFileInfo::getPseudoProbeSection(), llvm::MCObjectFileInfo::getStackSizesSection(), and llvm::MCObjectFileInfo::initMCObjectFileInfo().
Gets a symbol that will be defined to the final stack offset of a local variable after codegen.
Idx | - The index of a local variable passed to @llvm.localescape. |
Definition at line 214 of file MCContext.cpp.
References getOrCreateSymbol(), llvm::MCAsmInfo::getPrivateGlobalPrefix(), and Idx.
Definition at line 225 of file MCContext.cpp.
References getOrCreateSymbol(), and llvm::MCAsmInfo::getPrivateGlobalPrefix().
Definition at line 220 of file MCContext.cpp.
References getOrCreateSymbol(), and llvm::MCAsmInfo::getPrivateGlobalPrefix().
Referenced by recoverFramePointer().
Lookup the symbol inside with the specified Name
.
If it exists, return it. If not, create a forward reference and return it.
Name | - The symbol name, which must be unique across all symbols. |
Definition at line 201 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::MipsTargetELFStreamer::emitDirectiveCpsetup(), llvm::X86AsmPrinter::emitEndOfAsmFile(), llvm::EHStreamer::emitExceptionTable(), llvm::ARMAsmPrinter::emitFunctionEntryLabel(), llvm::AsmPrinter::emitGlobalVariable(), llvm::X86AsmPrinter::emitKCFITypeId(), llvm::CSKYAsmPrinter::emitMachineConstantPoolValue(), 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::AArch64MCInstLower::GetGlobalAddressSymbol(), llvm::PPCFunctionInfo::getGlobalEPSymbol(), 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().
|
inline |
Definition at line 448 of file MCContext.h.
References MRI.
Referenced by buildDefCFAReg(), llvm::createBPFbeMCCodeEmitter(), llvm::createBPFMCCodeEmitter(), llvm::createR600MCCodeEmitter(), llvm::MSP430FrameLowering::emitCalleeSavedFrameMoves(), llvm::X86FrameLowering::emitCalleeSavedFrameMoves(), llvm::X86FrameLowering::emitCalleeSavedFrameMovesFullCFA(), llvm::Mips16FrameLowering::emitPrologue(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::PPCFrameLowering::emitPrologue(), llvm::SystemZELFFrameLowering::emitPrologue(), llvm::XCoreFrameLowering::emitPrologue(), encodeSEHRegNum(), llvm::PPCMCCodeEmitter::get_crbitm_encoding(), llvm::CSKYMCCodeEmitter::getMachineOpValue(), llvm::MipsMCCodeEmitter::getMachineOpValue(), llvm::PPCMCCodeEmitter::getMachineOpValue(), llvm::HexagonMCCodeEmitter::getMachineOpValue(), llvm::AMDGPUDisassembler::getRegClassName(), llvm::MipsMCCodeEmitter::getRegisterListOpValue(), llvm::CSKYMCCodeEmitter::getRegisterSeqOpValue(), llvm::CSKYMCCodeEmitter::getRegSeqImmOpValue(), llvm::PPCMCCodeEmitter::getTLSRegEncoding(), llvm::PPCFrameLowering::inlineStackProbe(), and llvm::AArch64ExternalSymbolizer::tryAddingSymbolicOperand().
|
inline |
Definition at line 833 of file MCContext.h.
|
inline |
Definition at line 832 of file MCContext.h.
|
inline |
Definition at line 839 of file MCContext.h.
Definition at line 435 of file MCContext.h.
References llvm::SrcMgr.
Referenced by llvm::MCObjectStreamer::emitFill(), llvm::HexagonShuffler::reportError(), llvm::HexagonMCChecker::reportNote(), and llvm::HexagonShuffler::reportResourceUsage().
MCSectionSPIRV * MCContext::getSPIRVSection | ( | ) |
Definition at line 840 of file MCContext.cpp.
References F, and llvm::SectionKind::getText().
MCSubtargetInfo & MCContext::getSubtargetCopy | ( | const MCSubtargetInfo & | STI | ) |
Definition at line 875 of file MCContext.cpp.
Referenced by llvm::MCTargetAsmParser::copySTI().
|
inline |
Definition at line 452 of file MCContext.h.
Referenced by llvm::CSKYConstantPool::emitAll().
Definition at line 431 of file MCContext.h.
|
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 525 of file MCContext.h.
Referenced by llvm::WebAssemblyAsmPrinter::emitDecls().
|
inline |
Definition at line 649 of file MCContext.h.
References Flags, and getWasmSection().
MCSectionWasm * MCContext::getWasmSection | ( | const Twine & | Section, |
SectionKind | K, | ||
unsigned | Flags, | ||
const MCSymbolWasm * | Group, | ||
unsigned | UniqueID, | ||
const char * | BeginSymName | ||
) |
Definition at line 731 of file MCContext.cpp.
References F, Flags, llvm::MCSymbol::getName(), llvm::MCSymbol::setFragment(), and llvm::wasm::WASM_SYMBOL_TYPE_SECTION.
|
inline |
Definition at line 654 of file MCContext.h.
References Flags, and getWasmSection().
MCSectionWasm * MCContext::getWasmSection | ( | const Twine & | Section, |
SectionKind | K, | ||
unsigned | Flags, | ||
const Twine & | Group, | ||
unsigned | UniqueID, | ||
const char * | BeginSymName | ||
) |
Definition at line 718 of file MCContext.cpp.
References Flags, getOrCreateSymbol(), getWasmSection(), llvm::Twine::isTriviallyEmpty(), llvm::MCSymbolWasm::setComdat(), and llvm::Twine::str().
|
inline |
Definition at line 644 of file MCContext.h.
References Flags, and getWasmSection().
Referenced by llvm::WebAssemblyAsmPrinter::emitEndOfAsmFile(), llvm::WebAssemblyAsmPrinter::EmitProducerInfo(), llvm::WebAssemblyAsmPrinter::EmitTargetFeatures(), llvm::TargetLoweringObjectFileWasm::getExplicitSectionGlobal(), llvm::TargetLoweringObjectFileWasm::getStaticCtorSection(), getWasmSection(), llvm::TargetLoweringObjectFileWasm::InitializeWasm(), and selectWasmSectionForGlobal().
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 |
||
) |
Definition at line 770 of file MCContext.cpp.
References assert(), createTempSymbol(), F, llvm::XCOFF::getMappingClassString(), getOrCreateSymbol(), llvm::MCSymbolXCOFF::getUnqualifiedName(), llvm::MCSectionXCOFF::isMultiSymbolsAllowed(), llvm::report_fatal_error(), llvm::MCSymbol::setFragment(), and llvm::XCOFF::XMC_PR.
Referenced by createMCSymbolForTlsGetAddr(), llvm::TargetLoweringObjectFileXCOFF::getExplicitSectionGlobal(), llvm::TargetLoweringObjectFileXCOFF::getFunctionEntryPointSymbol(), llvm::TargetLoweringObjectFileXCOFF::getSectionForExternalReference(), llvm::TargetLoweringObjectFileXCOFF::getSectionForFunctionDescriptor(), llvm::TargetLoweringObjectFileXCOFF::getSectionForJumpTable(), llvm::TargetLoweringObjectFileXCOFF::getSectionForLSDA(), llvm::TargetLoweringObjectFileXCOFF::getSectionForTOCEntry(), and llvm::TargetLoweringObjectFileXCOFF::SelectSectionForGlobal().
|
inline |
Definition at line 848 of file MCContext.h.
Referenced by llvm::MCAssembler::layout().
bool MCContext::hasXCOFFSection | ( | StringRef | Section, |
XCOFF::CsectProperties | CsectProp | ||
) | const |
Definition at line 764 of file MCContext.cpp.
References llvm::XCOFF::CsectProperties::MappingClass.
void MCContext::initInlineSourceManager | ( | ) |
Definition at line 126 of file MCContext.cpp.
Reports whether MD5 checksum usage is consistent (all-or-none).
Definition at line 762 of file MCContext.h.
References getMCDwarfLineTable(), and llvm::MCDwarfLineTable::isMD5UsageConsistent().
Definition at line 632 of file MCContext.cpp.
References isELFImplicitMergeableSectionNamePrefix().
Referenced by calcUniqueIDUpdateFlagsAndSize(), and recordELFMergeableSectionInfo().
Definition at line 627 of file MCContext.cpp.
Referenced by calcUniqueIDUpdateFlagsAndSize(), and isELFGenericMergeableSection().
isValidDwarfFileNumber - takes a dwarf file number and returns true if it currently is assigned and false otherwise.
Definition at line 977 of file MCContext.cpp.
References getDwarfVersion(), llvm::MCDwarfLineTable::getMCDwarfFiles(), and getMCDwarfLineTable().
|
inline |
Definition at line 853 of file MCContext.h.
Get the symbol for Name
, or null.
Definition at line 359 of file MCContext.cpp.
References llvm::StringMap< ValueTy, AllocatorTy >::lookup(), and Name.
Referenced by llvm::X86AsmPrinter::emitEndOfAsmFile(), llvm::WasmException::endModule(), llvm::WebAssembly::getOrCreateFuncrefCallTableSymbol(), llvm::WebAssembly::getOrCreateFunctionTableSymbol(), and llvm::MCParserUtils::parseAssignmentExpression().
void MCContext::recordELFMergeableSectionInfo | ( | StringRef | SectionName, |
unsigned | Flags, | ||
unsigned | UniqueID, | ||
unsigned | EntrySize | ||
) |
Definition at line 611 of file MCContext.cpp.
References Flags, GenericSectionID, isELFGenericMergeableSection(), and llvm::ELF::SHF_MERGE.
Referenced by getELFSection().
void MCContext::registerInlineAsmLabel | ( | MCSymbol * | Sym | ) |
registerInlineAsmLabel - Records that the name is a label referenced in inline assembly.
Definition at line 371 of file MCContext.cpp.
References Sym.
Referenced by EmitInlineAsmStr().
void MCContext::remapDebugPath | ( | SmallVectorImpl< char > & | Path | ) |
Remap one path in-place as per the debug prefix map.
Definition at line 884 of file MCContext.cpp.
References From, llvm::sys::path::replace_path_prefix(), and llvm::reverse().
Referenced by RemapDebugPaths().
void MCContext::RemapDebugPaths | ( | ) |
Definition at line 890 of file MCContext.cpp.
References llvm::SmallVectorBase< Size_T >::empty(), P, and remapDebugPath().
Referenced by llvm::MCObjectStreamer::finishImpl().
Definition at line 1049 of file MCContext.cpp.
References D, llvm::SourceMgr::DK_Error, and llvm::SourceMgr::GetMessage().
Referenced by llvm::ARMAsmBackend::adjustFixupValue(), adjustFixupValue(), ARM64EmitUnwindInfo(), ARMEmitUnwindInfo(), checkARM64Instructions(), checkARMInstructions(), llvm::MCStreamer::checkCVLocSection(), checkIs32(), checkIs64(), llvm::MCAssembler::computeFragmentSize(), llvm::MCStreamer::emitCFIStartProc(), llvm::MCStreamer::emitCVInlineSiteIdDirective(), llvm::AsmPrinter::emitFunctionBody(), 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(), llvm::MCAsmLayout::getBaseSymbol(), llvm::MipsMCCodeEmitter::getExprOpValue(), llvm::WebAssembly::getOrCreateFuncrefCallTableSymbol(), llvm::WebAssembly::getOrCreateFunctionTableSymbol(), isNonILP32reloc(), llvm::HexagonMCChecker::reportError(), llvm::HexagonShuffler::reportError(), reportOutOfRangeError(), reportWarning(), llvm::AVRTargetObjectFile::SelectSectionForGlobal(), and llvm::MCAssembler::writeSectionData().
Definition at line 1056 of file MCContext.cpp.
References D, llvm::SourceMgr::DK_Warning, llvm::SourceMgr::GetMessage(), and reportError().
Referenced by llvm::MCELFStreamer::emitSymbolAttribute(), and llvm::HexagonMCChecker::reportWarning().
void MCContext::reset | ( | ) |
reset - return object to right after construction state to prepare to process a new module
Definition at line 135 of file MCContext.cpp.
References llvm::SmallVectorImpl< T >::clear(), llvm::StringMap< ValueTy, AllocatorTy >::clear(), defaultDiagHandler(), DWARF2_FLAG_IS_STMT, and llvm::BumpPtrAllocatorImpl< AllocatorT, SlabSize, SizeThreshold, GrowthDelay >::Reset().
Referenced by llvm::MachineModuleInfo::finalize(), and ~MCContext().
|
inline |
Definition at line 456 of file MCContext.h.
Referenced by llvm::LLVMTargetMachine::addPassesToEmitMC().
|
inline |
Set the compilation directory for DW_AT_comp_dir.
Definition at line 697 of file MCContext.h.
References llvm::StringRef::str().
|
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 770 of file MCContext.h.
References Flags, llvm::MCDwarfLoc::setColumn(), llvm::MCDwarfLoc::setDiscriminator(), llvm::MCDwarfLoc::setFileNum(), llvm::MCDwarfLoc::setFlags(), llvm::MCDwarfLoc::setIsa(), and llvm::MCDwarfLoc::setLine().
Referenced by llvm::MCStreamer::emitDwarfLocDirective().
|
inline |
Definition at line 440 of file MCContext.h.
Referenced by llvm::MachineModuleInfoWrapperPass::doInitialization().
|
inline |
Definition at line 749 of file MCContext.h.
|
inline |
Definition at line 818 of file MCContext.h.
|
inline |
Definition at line 821 of file MCContext.h.
|
inline |
Definition at line 824 of file MCContext.h.
|
inline |
Definition at line 827 of file MCContext.h.
|
inline |
Definition at line 792 of file MCContext.h.
|
inline |
Definition at line 788 of file MCContext.h.
Specifies information about the "root file" for assembler clients (e.g., llvm-mc).
Assumes compilation dir etc. have been set up.
Definition at line 925 of file MCContext.cpp.
References llvm::sys::path::append(), assert(), llvm::StringRef::consume_front(), llvm::StringRef::drop_front(), llvm::SmallVectorBase< Size_T >::empty(), llvm::StringRef::empty(), llvm::MD5::final(), llvm::StringRef::front(), getCompilationDir(), getDwarfVersion(), getMainFileName(), llvm::sys::path::is_separator(), llvm::sys::path::remove_filename(), setMCLineTableRootFile(), and llvm::MD5::update().
|
inline |
Set the main file name and override the default.
Definition at line 714 of file MCContext.h.
|
inline |
Specifies the "root" file and directory of the compilation unit.
These are "file 0" and "directory 0" in DWARF v5.
Definition at line 753 of file MCContext.h.
References getMCDwarfLineTable(), and llvm::MCDwarfLineTable::setRootFile().
Referenced by llvm::MCStreamer::emitDwarfFile0Directive(), and setGenDwarfRootFile().
|
inline |
Definition at line 444 of file MCContext.h.
Referenced by initializeRecordStreamer(), and llvm::MachineModuleInfo::MachineModuleInfo().
|
inline |
Definition at line 835 of file MCContext.h.
|
inline |
Definition at line 840 of file MCContext.h.
void MCContext::setSymbolValue | ( | MCStreamer & | Streamer, |
const Twine & | Sym, | ||
uint64_t | Val | ||
) |
Set value for a symbol.
Definition at line 365 of file MCContext.cpp.
References llvm::MCConstantExpr::create(), llvm::MCStreamer::emitAssignment(), getOrCreateSymbol(), and Sym.
|
inline |
Definition at line 457 of file MCContext.h.
|
inline |
Definition at line 862 of file MCContext.h.
References Name.