|
LLVM
3.7.0
|
Context object for machine code objects. More...
#include <MCContext.h>
Public Types | |
| typedef StringMap< MCSymbol *, BumpPtrAllocator & > | SymbolTable |
Public Member Functions | |
| MCContext (const MCAsmInfo *MAI, const MCRegisterInfo *MRI, const MCObjectFileInfo *MOFI, const SourceMgr *Mgr=nullptr, bool DoAutoReset=true) | |
| ~MCContext () | |
| const SourceMgr * | getSourceManager () const |
| const MCAsmInfo * | getAsmInfo () const |
| const MCRegisterInfo * | getRegisterInfo () const |
| const MCObjectFileInfo * | getObjectFileInfo () const |
| void | setAllowTemporaryLabels (bool Value) |
| void | setUseNamesOnTempLabels (bool Value) |
| char * | getSecureLogFile () |
| raw_ostream * | getSecureLog () |
| bool | getSecureLogUsed () |
| void | setSecureLog (raw_ostream *Value) |
| void | setSecureLogUsed (bool Value) |
| void * | allocate (unsigned Size, unsigned Align=8) |
| void | deallocate (void *Ptr) |
| LLVM_ATTRIBUTE_NORETURN void | reportFatalError (SMLoc L, const Twine &Msg) const |
Module Lifetime Management | |
| void | reset () |
| reset - return object to right after construction state to prepare to process a new module More... | |
Symbol Management | |
| MCSymbol * | createLinkerPrivateTempSymbol () |
| Create and return a new linker temporary symbol with a unique but unspecified name. More... | |
| MCSymbol * | createTempSymbol (bool CanBeUnnamed=true) |
| Create and return a new assembler temporary symbol with a unique but unspecified name. More... | |
| MCSymbol * | createTempSymbol (const Twine &Name, bool AlwaysAddSuffix, bool CanBeUnnamed=true) |
| MCSymbol * | createDirectionalLocalSymbol (unsigned LocalLabelVal) |
| Create the definition of a directional local symbol for numbered label (used for "1:" definitions). More... | |
| MCSymbol * | getDirectionalLocalSymbol (unsigned LocalLabelVal, bool Before) |
| Create and return a directional local symbol for numbered label (used for "1b" or 1f" references). More... | |
| MCSymbol * | getOrCreateSymbol (const Twine &Name) |
Lookup the symbol inside with the specified Name. More... | |
| MCSymbolELF * | getOrCreateSectionSymbol (const MCSectionELF &Section) |
| MCSymbol * | getOrCreateFrameAllocSymbol (StringRef FuncName, unsigned Idx) |
| Gets a symbol that will be defined to the final stack offset of a local variable after codegen. More... | |
| MCSymbol * | getOrCreateParentFrameOffsetSymbol (StringRef FuncName) |
| MCSymbol * | getOrCreateLSDASymbol (StringRef FuncName) |
| MCSymbol * | lookupSymbol (const Twine &Name) const |
Get the symbol for Name, or null. More... | |
| const SymbolTable & | getSymbols () const |
| getSymbols - Get a reference for the symbol table for clients that want to, for example, iterate over all symbols. More... | |
Section Management | |
| MCSectionMachO * | getMachOSection (StringRef Segment, StringRef Section, unsigned TypeAndAttributes, unsigned Reserved2, SectionKind K, const char *BeginSymName=nullptr) |
| Return the MCSection for the specified mach-o section. More... | |
| MCSectionMachO * | getMachOSection (StringRef Segment, StringRef Section, unsigned TypeAndAttributes, SectionKind K, const char *BeginSymName=nullptr) |
| MCSectionELF * | getELFSection (StringRef Section, unsigned Type, unsigned Flags) |
| MCSectionELF * | getELFSection (StringRef Section, unsigned Type, unsigned Flags, const char *BeginSymName) |
| MCSectionELF * | getELFSection (StringRef Section, unsigned Type, unsigned Flags, unsigned EntrySize, StringRef Group) |
| MCSectionELF * | getELFSection (StringRef Section, unsigned Type, unsigned Flags, unsigned EntrySize, StringRef Group, const char *BeginSymName) |
| MCSectionELF * | getELFSection (StringRef Section, unsigned Type, unsigned Flags, unsigned EntrySize, StringRef Group, unsigned UniqueID) |
| MCSectionELF * | getELFSection (StringRef Section, unsigned Type, unsigned Flags, unsigned EntrySize, StringRef Group, unsigned UniqueID, const char *BeginSymName) |
| MCSectionELF * | getELFSection (StringRef Section, unsigned Type, unsigned Flags, unsigned EntrySize, const MCSymbolELF *Group, unsigned UniqueID, const char *BeginSymName, const MCSectionELF *Associated) |
| MCSectionELF * | createELFRelSection (StringRef Name, unsigned Type, unsigned Flags, unsigned EntrySize, const MCSymbolELF *Group, const MCSectionELF *Associated) |
| void | renameELFSection (MCSectionELF *Section, StringRef Name) |
| MCSectionELF * | createELFGroupSection (const MCSymbolELF *Group) |
| MCSectionCOFF * | getCOFFSection (StringRef Section, unsigned Characteristics, SectionKind Kind, StringRef COMDATSymName, int Selection, const char *BeginSymName=nullptr) |
| MCSectionCOFF * | getCOFFSection (StringRef Section, unsigned Characteristics, SectionKind Kind, const char *BeginSymName=nullptr) |
| MCSectionCOFF * | getCOFFSection (StringRef Section) |
| MCSectionCOFF * | getAssociativeCOFFSection (MCSectionCOFF *Sec, const MCSymbol *KeySym) |
| Gets or creates a section equivalent to Sec that is associated with the section containing KeySym. More... | |
Dwarf Management | |
| StringRef | getCompilationDir () const |
| Get the compilation directory for DW_AT_comp_dir This can be overridden by clients which want to control the reported compilation directory and have it be something other than the current working directory. More... | |
| void | setCompilationDir (StringRef S) |
| Set the compilation directory for DW_AT_comp_dir Override the default (CWD) compilation directory. More... | |
| const std::string & | getMainFileName () const |
| Get the main file name for use in error messages and debug info. More... | |
| void | setMainFileName (StringRef S) |
| Set the main file name and override the default. More... | |
| unsigned | getDwarfFile (StringRef Directory, StringRef FileName, unsigned FileNumber, unsigned CUID) |
| Creates an entry in the dwarf file and directory tables. More... | |
| bool | isValidDwarfFileNumber (unsigned FileNumber, unsigned CUID=0) |
| isValidDwarfFileNumber - takes a dwarf file number and returns true if it currently is assigned and false otherwise. More... | |
| 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) |
| bool | hasMCLineSections () const |
| unsigned | getDwarfCompileUnitID () |
| void | setDwarfCompileUnitID (unsigned CUIndex) |
| void | setMCLineTableCompilationDir (unsigned CUID, StringRef CompilationDir) |
| 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. More... | |
| void | clearDwarfLocSeen () |
| bool | getDwarfLocSeen () |
| const MCDwarfLoc & | getCurrentDwarfLoc () |
| bool | getGenDwarfForAssembly () |
| void | setGenDwarfForAssembly (bool Value) |
| unsigned | getGenDwarfFileNumber () |
| void | setGenDwarfFileNumber (unsigned FileNumber) |
| const SetVector< MCSection * > & | getGenDwarfSectionSyms () |
| bool | addGenDwarfSection (MCSection *Sec) |
| void | finalizeDwarfSections (MCStreamer &MCOS) |
| Remove empty sections from SectionStartEndSyms, to avoid generating useless debug info for them. More... | |
| const std::vector < MCGenDwarfLabelEntry > & | getMCGenDwarfLabelEntries () const |
| void | addMCGenDwarfLabelEntry (const MCGenDwarfLabelEntry &E) |
| void | setDwarfDebugFlags (StringRef S) |
| StringRef | getDwarfDebugFlags () |
| void | setDwarfDebugProducer (StringRef S) |
| StringRef | getDwarfDebugProducer () |
| 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 48 of file MCContext.h.
| typedef StringMap<MCSymbol *, BumpPtrAllocator &> llvm::MCContext::SymbolTable |
Definition at line 53 of file MCContext.h.
|
explicit |
Definition at line 36 of file MCContext.cpp.
References llvm::SmallVectorImpl< T >::clear(), llvm::sys::fs::current_path(), llvm::SourceMgr::getMainFileID(), llvm::SourceMgr::getMemoryBuffer(), llvm::SourceMgr::getNumBuffers(), and llvm::Symbols.
| MCContext::~MCContext | ( | ) |
Definition at line 59 of file MCContext.cpp.
References reset().
Definition at line 473 of file MCContext.h.
|
inline |
Definition at line 481 of file MCContext.h.
Referenced by llvm::MCGenDwarfLabelEntry::Make().
Definition at line 502 of file MCContext.h.
References Align(), and llvm::BumpPtrAllocatorImpl< AllocatorT, SlabSize, SizeThreshold >::Allocate().
|
inline |
Definition at line 459 of file MCContext.h.
Referenced by llvm::MCLineEntry::Make().
Create the definition of a directional local symbol for numbered label (used for "1:" definitions).
Definition at line 248 of file MCContext.cpp.
| MCSectionELF * MCContext::createELFGroupSection | ( | const MCSymbolELF * | Group | ) |
Definition at line 376 of file MCContext.cpp.
References llvm::SectionKind::getReadOnly(), and llvm::ELF::SHT_GROUP.
| MCSectionELF * MCContext::createELFRelSection | ( | StringRef | Name, |
| unsigned | Type, | ||
| unsigned | Flags, | ||
| unsigned | EntrySize, | ||
| const MCSymbolELF * | Group, | ||
| const MCSectionELF * | Associated | ||
| ) |
Definition at line 316 of file MCContext.cpp.
References llvm::SectionKind::getReadOnly(), I, and llvm::StringMap< ValueTy, AllocatorTy >::insert().
| MCSymbol * MCContext::createLinkerPrivateTempSymbol | ( | ) |
Create and return a new linker temporary symbol with a unique but unspecified name.
Definition at line 216 of file MCContext.cpp.
References llvm::MCAsmInfo::getLinkerPrivateGlobalPrefix().
Create and return a new assembler temporary symbol with a unique but unspecified name.
Definition at line 222 of file MCContext.cpp.
Referenced by llvm::ConstantPool::addEntry(), llvm::MachineModuleInfo::addLandingPad(), llvm::DwarfDebug::beginInstruction(), llvm::AsmPrinter::createTempSymbol(), llvm::MCDwarfLineTableHeader::Emit(), llvm::MCGenDwarfInfo::Emit(), llvm::MCDwarfFrameEmitter::Emit(), llvm::MCStreamer::emitAbsoluteSymbolDiff(), EmitGenDwarfInfo(), llvm::ARMAsmPrinter::EmitInstruction(), llvm::X86AsmPrinter::EmitInstruction(), llvm::ARMAsmPrinter::EmitMachineConstantPoolValue(), llvm::AArch64FrameLowering::emitPrologue(), llvm::EmitUnwindInfo(), llvm::MCObjectStreamer::EmitValueToOffset(), llvm::MCStreamer::EmitWinCFIAllocStack(), llvm::MCStreamer::EmitWinCFIEndChained(), llvm::MCStreamer::EmitWinCFIEndProc(), llvm::MCStreamer::EmitWinCFIEndProlog(), llvm::MCStreamer::EmitWinCFIPushFrame(), llvm::MCStreamer::EmitWinCFIPushReg(), llvm::MCStreamer::EmitWinCFISaveReg(), llvm::MCStreamer::EmitWinCFISaveXMM(), llvm::MCStreamer::EmitWinCFISetFrame(), llvm::MCStreamer::EmitWinCFIStartChained(), llvm::MCStreamer::EmitWinCFIStartProc(), llvm::DwarfDebug::endInstruction(), forceExpAbs(), getCOFFSection(), getELFSection(), llvm::MCSection::getEndSymbol(), llvm::AArch64MCAsmInfoDarwin::getExprForPersonalitySymbol(), llvm::AArch64_MachoTargetObjectFile::getIndirectSymViaGOTPCRel(), getMachOSection(), llvm::AArch64_MachoTargetObjectFile::getTTypeGlobalReference(), llvm::TargetLoweringObjectFile::getTTypeReference(), llvm::MCLineEntry::Make(), llvm::MCGenDwarfLabelEntry::Make(), and llvm::FaultMaps::recordFaultingOp().
| MCSymbol * MCContext::createTempSymbol | ( | const Twine & | Name, |
| bool | AlwaysAddSuffix, | ||
| bool | CanBeUnnamed = true |
||
| ) |
Definition at line 209 of file MCContext.cpp.
References llvm::MCAsmInfo::getPrivateGlobalPrefix().
|
inline |
Definition at line 505 of file MCContext.h.
| void MCContext::finalizeDwarfSections | ( | MCStreamer & | MCOS | ) |
Remove empty sections from SectionStartEndSyms, to avoid generating useless debug info for them.
Definition at line 469 of file MCContext.cpp.
References llvm::MCStreamer::mayHaveInstructions().
Referenced by llvm::MCGenDwarfInfo::Emit().
Definition at line 225 of file MCContext.h.
Referenced by llvm::MCDwarfLineTableHeader::Emit(), llvm::MCGenDwarfInfo::Emit(), llvm::MCDwarfFrameEmitter::Emit(), llvm::MCStreamer::emitAbsoluteSymbolDiff(), llvm::MCStreamer::EmitCFIStartProc(), EmitDwarfLineTable(), emitFDESymbol(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), EmitGenDwarfRanges(), llvm::MCStreamer::EmitIntValue(), EmitPersonality(), llvm::MCStreamer::EmitWinCFIStartProc(), llvm::MCDwarfFrameEmitter::EncodeAdvanceLoc(), forceExpAbs(), llvm::MCAssembler::getAtom(), getDataAlignmentFactor(), llvm::MCStreamer::getDwarfLineTableSymbol(), getSizeForEncoding(), llvm::MachineBasicBlock::getSymbol(), llvm::MCELFStreamer::InitSections(), and ScaleAddrDelta().
| MCSectionCOFF * MCContext::getAssociativeCOFFSection | ( | MCSectionCOFF * | Sec, |
| const MCSymbol * | KeySym | ||
| ) |
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 428 of file MCContext.cpp.
References Characteristics, llvm::MCSectionCOFF::getCharacteristics(), getCOFFSection(), llvm::MCSection::getKind(), llvm::MCSymbol::getName(), llvm::MCSectionCOFF::getSectionName(), llvm::COFF::IMAGE_COMDAT_SELECT_ASSOCIATIVE, and llvm::COFF::IMAGE_SCN_LNK_COMDAT.
Referenced by llvm::TargetLoweringObjectFileCOFF::getStaticCtorSection(), llvm::TargetLoweringObjectFileCOFF::getStaticDtorSection(), and llvm::WinEH::getUnwindInfoSection().
| MCSectionCOFF * MCContext::getCOFFSection | ( | StringRef | Section, |
| unsigned | Characteristics, | ||
| SectionKind | Kind, | ||
| StringRef | COMDATSymName, | ||
| int | Selection, | ||
| const char * | BeginSymName = nullptr |
||
| ) |
Definition at line 383 of file MCContext.cpp.
References createTempSymbol(), llvm::StringRef::empty(), llvm::MCSymbol::getName(), getOrCreateSymbol(), and llvm::ARMBuildAttrs::Section.
Referenced by getAssociativeCOFFSection(), getCOFFSection(), llvm::TargetLoweringObjectFileCOFF::getExplicitSectionGlobal(), llvm::TargetLoweringObjectFileCOFF::getSectionForJumpTable(), llvm::WinEH::getUnwindInfoSection(), and llvm::TargetLoweringObjectFileCOFF::SelectSectionForGlobal().
| MCSectionCOFF * MCContext::getCOFFSection | ( | StringRef | Section, |
| unsigned | Characteristics, | ||
| SectionKind | Kind, | ||
| const char * | BeginSymName = nullptr |
||
| ) |
Definition at line 413 of file MCContext.cpp.
References getCOFFSection().
| MCSectionCOFF * MCContext::getCOFFSection | ( | StringRef | Section | ) |
Definition at line 420 of file MCContext.cpp.
References llvm::ARMBuildAttrs::Section.
|
inline |
Get the compilation directory for DW_AT_comp_dir This can be overridden by clients which want to control the reported compilation directory and have it be something other than the current working directory.
Returns an empty string if the current directory cannot be determined.
Definition at line 389 of file MCContext.h.
Referenced by EmitGenDwarfAbbrev(), and EmitGenDwarfInfo().
|
inline |
Definition at line 462 of file MCContext.h.
Referenced by llvm::MCLineEntry::Make().
Create and return a directional local symbol for numbered label (used for "1b" or 1f" references).
Definition at line 253 of file MCContext.cpp.
|
inline |
Definition at line 436 of file MCContext.h.
Referenced by llvm::MCLineEntry::Make().
|
inline |
Definition at line 486 of file MCContext.h.
Referenced by EmitGenDwarfAbbrev(), and EmitGenDwarfInfo().
|
inline |
Definition at line 489 of file MCContext.h.
Referenced by EmitGenDwarfInfo().
| unsigned MCContext::getDwarfFile | ( | StringRef | Directory, |
| StringRef | FileName, | ||
| unsigned | FileNumber, | ||
| unsigned | CUID | ||
| ) |
Creates an entry in the dwarf file and directory tables.
getDwarfFile - takes a file name an 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 451 of file MCContext.cpp.
References llvm::MCDwarfLineTable::getFile().
Referenced by llvm::MCStreamer::EmitDwarfFileDirective().
|
inline |
Definition at line 461 of file MCContext.h.
Referenced by llvm::MCLineEntry::Make().
|
inline |
Definition at line 492 of file MCContext.h.
Referenced by llvm::MCGenDwarfInfo::Emit(), EmitGenDwarfAbbrev(), and EmitGenDwarfInfo().
|
inline |
Definition at line 311 of file MCContext.h.
Referenced by llvm::MCELFStreamer::EmitCommonSymbol(), llvm::MipsTargetELFStreamer::emitDirectiveEnd(), llvm::AMDGPUTargetELFStreamer::EmitDirectiveHSACodeObjectISA(), llvm::AMDGPUTargetELFStreamer::EmitDirectiveHSACodeObjectVersion(), llvm::MCELFStreamer::EmitIdent(), llvm::MipsTargetELFStreamer::emitMipsAbiFlags(), llvm::MipsRegInfoRecord::EmitMipsOptionRecord(), llvm::MipsAsmPrinter::EmitStartOfAsmFile(), llvm::MCObjectFileInfo::getDwarfTypesSection(), getELFSection(), llvm::XCoreTargetObjectFile::getExplicitSectionGlobal(), getStaticStructorSection(), llvm::HexagonMCELFStreamer::HexagonMCEmitCommonSymbol(), llvm::MipsTargetObjectFile::Initialize(), llvm::HexagonTargetObjectFile::Initialize(), llvm::XCoreTargetObjectFile::Initialize(), llvm::AMDGPUAsmPrinter::runOnMachineFunction(), and selectELFSectionForGlobal().
|
inline |
Definition at line 316 of file MCContext.h.
References getELFSection().
|
inline |
Definition at line 321 of file MCContext.h.
References getELFSection().
|
inline |
Definition at line 327 of file MCContext.h.
References getELFSection().
|
inline |
Definition at line 334 of file MCContext.h.
References getELFSection().
| MCSectionELF * MCContext::getELFSection | ( | StringRef | Section, |
| unsigned | Type, | ||
| unsigned | Flags, | ||
| unsigned | EntrySize, | ||
| StringRef | Group, | ||
| unsigned | UniqueID, | ||
| const char * | BeginSymName | ||
| ) |
Definition at line 329 of file MCContext.cpp.
References llvm::StringRef::empty(), getELFSection(), and getOrCreateSymbol().
| MCSectionELF * MCContext::getELFSection | ( | StringRef | Section, |
| unsigned | Type, | ||
| unsigned | Flags, | ||
| unsigned | EntrySize, | ||
| const MCSymbolELF * | Group, | ||
| unsigned | UniqueID, | ||
| const char * | BeginSymName, | ||
| const MCSectionELF * | Associated | ||
| ) |
Definition at line 341 of file MCContext.cpp.
References createTempSymbol(), llvm::MCSymbol::getName(), llvm::SectionKind::getReadOnly(), llvm::SectionKind::getText(), Kind, llvm::ARMBuildAttrs::Section, and llvm::ELF::SHF_EXECINSTR.
|
inline |
Definition at line 466 of file MCContext.h.
Referenced by llvm::MCGenDwarfLabelEntry::Make().
|
inline |
Definition at line 464 of file MCContext.h.
Definition at line 470 of file MCContext.h.
Referenced by llvm::MCGenDwarfInfo::Emit(), EmitGenDwarfAbbrev(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), EmitGenDwarfRanges(), and llvm::MCGenDwarfLabelEntry::Make().
| 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 271 of file MCContext.cpp.
References createTempSymbol(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), and llvm::ARMBuildAttrs::Section.
Referenced by llvm::X86AsmPrinter::EmitEndOfAsmFile(), llvm::TargetLoweringObjectFileMachO::emitModuleFlags(), llvm::TargetLoweringObjectFileMachO::getExplicitSectionGlobal(), and getMachOSection().
|
inline |
Definition at line 304 of file MCContext.h.
References getMachOSection().
|
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 398 of file MCContext.h.
|
inline |
Definition at line 426 of file MCContext.h.
References llvm::MCDwarfLineTable::getMCDwarfDirs(), and getMCDwarfLineTable().
Referenced by EmitGenDwarfInfo().
|
inline |
Definition at line 423 of file MCContext.h.
References llvm::MCDwarfLineTable::getMCDwarfFiles(), and getMCDwarfLineTable().
Referenced by EmitGenDwarfInfo(), and isValidDwarfFileNumber().
|
inline |
Definition at line 413 of file MCContext.h.
Referenced by llvm::MCStreamer::getDwarfLineTableSymbol(), getMCDwarfDirs(), getMCDwarfFiles(), llvm::MCLineEntry::Make(), and setMCLineTableCompilationDir().
|
inline |
Definition at line 417 of file MCContext.h.
References I.
|
inline |
Definition at line 409 of file MCContext.h.
Referenced by llvm::MCDwarfLineTable::Emit().
|
inline |
Definition at line 478 of file MCContext.h.
Referenced by EmitGenDwarfInfo().
|
inline |
Definition at line 229 of file MCContext.h.
Referenced by llvm::MCDwarfLineTable::Emit(), llvm::MCGenDwarfInfo::Emit(), llvm::MCDwarfFrameEmitter::Emit(), llvm::AMDGPUTargetELFStreamer::EmitAMDKernelCodeT(), llvm::MCWinCOFFStreamer::EmitCOFFSafeSEH(), llvm::MCWinCOFFStreamer::EmitCommonSymbol(), EmitDwarfLineTable(), llvm::MipsAsmPrinter::EmitEndOfAsmFile(), EmitGenDwarfAbbrev(), EmitGenDwarfAranges(), EmitGenDwarfInfo(), EmitGenDwarfRanges(), llvm::MCWinCOFFStreamer::EmitLocalCommonSymbol(), llvm::MipsTargetELFStreamer::finish(), llvm::WinEH::UnwindEmitter::getPDataSection(), llvm::WinEH::UnwindEmitter::getXDataSection(), llvm::MCELFStreamer::InitSections(), llvm::MipsTargetELFStreamer::MipsTargetELFStreamer(), llvm::FaultMaps::serializeToFaultMapSection(), and llvm::StackMaps::serializeToStackMapSection().
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 .localescape. |
Definition at line 146 of file MCContext.cpp.
References getOrCreateSymbol(), and llvm::MCAsmInfo::getPrivateGlobalPrefix().
Definition at line 157 of file MCContext.cpp.
References getOrCreateSymbol(), and llvm::MCAsmInfo::getPrivateGlobalPrefix().
Referenced by LowerINTRINSIC_WO_CHAIN().
Definition at line 152 of file MCContext.cpp.
References getOrCreateSymbol(), and llvm::MCAsmInfo::getPrivateGlobalPrefix().
Referenced by llvm::WinException::beginFunction(), and recoverFramePointer().
| MCSymbolELF * MCContext::getOrCreateSectionSymbol | ( | const MCSectionELF & | Section | ) |
Definition at line 124 of file MCContext.cpp.
References llvm::MCSectionELF::getSectionName(), llvm::MCSymbol::isUndefined(), and llvm::ARMBuildAttrs::Section.
Referenced by llvm::MCELFStreamer::ChangeSection().
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 111 of file MCContext.cpp.
References llvm::StringRef::empty(), and llvm::Twine::toStringRef().
Referenced by llvm::AsmPrinter::doFinalization(), EmitCamlGlobal(), llvm::MipsTargetELFStreamer::emitDirectiveCpLoad(), llvm::AMDGPUAsmPrinter::EmitEndOfAsmFile(), llvm::X86AsmPrinter::EmitEndOfAsmFile(), llvm::EHStreamer::emitExceptionTable(), llvm::AsmPrinter::EmitGlobalVariable(), llvm::AsmPrinter::EmitSpecialLLVMGlobal(), llvm::X86AsmPrinter::EmitStartOfAsmFile(), GetAnonSym(), getCOFFSection(), llvm::MSP430MCInstLower::GetConstantPoolIndexSymbol(), llvm::AsmPrinter::GetCPISymbol(), llvm::MCStreamer::getDwarfLineTableSymbol(), getELFSection(), llvm::AsmPrinter::GetExternalSymbolSymbol(), getGlobalOffsetTable(), llvm::MachineFunction::getJTISymbol(), llvm::AsmPrinter::GetJTSetSymbol(), llvm::MSP430MCInstLower::GetJumpTableSymbol(), GetLazyPtr(), getOrCreateFrameAllocSymbol(), getOrCreateLSDASymbol(), getOrCreateParentFrameOffsetSymbol(), llvm::MachineFunction::getPICBaseSymbol(), getPICLabel(), llvm::PPCFunctionInfo::getPICOffsetSymbol(), llvm::TargetMachine::getSymbol(), llvm::MachineBasicBlock::getSymbol(), GetSymbolFromOperand(), llvm::TargetLoweringObjectFile::getSymbolWithGlobalValueBase(), getTLSGetOffset(), llvm::AMDGPUMCInstLower::lower(), llvm::FastISel::lowerCallTo(), llvm::MCParserUtils::parseAssignmentExpression(), printSymbolOperand(), llvm::FaultMaps::serializeToFaultMapSection(), llvm::StackMaps::serializeToStackMapSection(), llvm::FastISel::CallLoweringInfo::setCallee(), llvm::AArch64ExternalSymbolizer::tryAddingSymbolicOperand(), and llvm::MCExternalSymbolizer::tryAddingSymbolicOperand().
|
inline |
Definition at line 227 of file MCContext.h.
Referenced by llvm::ARMFrameLowering::adjustForSegmentedStacks(), llvm::AArch64FrameLowering::emitCalleeSavedFrameMoves(), llvm::X86FrameLowering::emitCalleeSavedFrameMoves(), emitDebugValueComment(), llvm::AsmPrinter::EmitDwarfRegOp(), llvm::MipsTargetELFStreamer::emitFrame(), llvm::AsmPrinter::emitImplicitDef(), llvm::MipsELFStreamer::EmitInstruction(), emitKill(), llvm::Mips16FrameLowering::emitPrologue(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::SparcFrameLowering::emitPrologue(), llvm::XCoreFrameLowering::emitPrologue(), llvm::ARMFrameLowering::emitPrologue(), llvm::PPCFrameLowering::emitPrologue(), llvm::SystemZFrameLowering::emitPrologue(), llvm::X86AsmInstrumentation::GetFrameRegGeneric(), llvm::HexagonMCCodeEmitter::getMachineOpValue(), llvm::MipsRegInfoRecord::MipsRegInfoRecord(), and llvm::AArch64ExternalSymbolizer::tryAddingSymbolicOperand().
|
inline |
Definition at line 497 of file MCContext.h.
|
inline |
Definition at line 496 of file MCContext.h.
|
inline |
Definition at line 498 of file MCContext.h.
Definition at line 223 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 290 of file MCContext.h.
|
inline |
Definition at line 430 of file MCContext.h.
isValidDwarfFileNumber - takes a dwarf file number and returns true if it currently is assigned and false otherwise.
Definition at line 459 of file MCContext.cpp.
References llvm::SmallVectorBase::empty(), getMCDwarfFiles(), and llvm::SmallVectorTemplateCommon< T >::size().
Get the symbol for Name, or null.
Definition at line 261 of file MCContext.cpp.
References llvm::StringMap< ValueTy, AllocatorTy >::lookup(), and llvm::Twine::toStringRef().
Referenced by llvm::MCParserUtils::parseAssignmentExpression().
| void MCContext::renameELFSection | ( | MCSectionELF * | Section, |
| StringRef | Name | ||
| ) |
Definition at line 300 of file MCContext.cpp.
References llvm::MCSectionELF::getGroup(), llvm::MCSectionELF::getSectionName(), llvm::MCSectionELF::getUniqueID(), I, and llvm::ARMBuildAttrs::Section.
Definition at line 474 of file MCContext.cpp.
References llvm::SourceMgr::DK_Error, llvm::SourceMgr::PrintMessage(), llvm::report_fatal_error(), and llvm::sys::RunInterruptHandlers().
Referenced by adjustFixupValue(), and llvm::MCAsmLayout::getBaseSymbol().
| void MCContext::reset | ( | ) |
reset - return object to right after construction state to prepare to process a new module
Definition at line 74 of file MCContext.cpp.
References llvm::StringMap< ValueTy, AllocatorTy >::clear(), llvm::SmallVectorImpl< T >::clear(), DWARF2_FLAG_IS_STMT, I, and llvm::BumpPtrAllocatorImpl< AllocatorT, SlabSize, SizeThreshold >::Reset().
Referenced by llvm::MachineModuleInfo::doFinalization(), and ~MCContext().
|
inline |
Definition at line 231 of file MCContext.h.
Referenced by llvm::LLVMTargetMachine::addPassesToEmitFile(), and llvm::LLVMTargetMachine::addPassesToEmitMC().
|
inline |
Set the compilation directory for DW_AT_comp_dir Override the default (CWD) compilation directory.
Definition at line 393 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 448 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().
|
inline |
Definition at line 437 of file MCContext.h.
Referenced by llvm::DwarfDebug::endFunction().
|
inline |
Definition at line 485 of file MCContext.h.
|
inline |
Definition at line 488 of file MCContext.h.
|
inline |
Definition at line 491 of file MCContext.h.
|
inline |
Definition at line 467 of file MCContext.h.
|
inline |
Definition at line 465 of file MCContext.h.
|
inline |
Set the main file name and override the default.
Definition at line 401 of file MCContext.h.
|
inline |
Definition at line 440 of file MCContext.h.
References getMCDwarfLineTable(), and llvm::MCDwarfLineTable::setCompilationDir().
|
inline |
Definition at line 499 of file MCContext.h.
|
inline |
Definition at line 500 of file MCContext.h.
|
inline |
Definition at line 232 of file MCContext.h.
Referenced by llvm::LLVMTargetMachine::addPassesToEmitFile().
1.8.6