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

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 SourceMgrgetSourceManager () const
 
const MCAsmInfogetAsmInfo () const
 
const MCRegisterInfogetRegisterInfo () const
 
const MCObjectFileInfogetObjectFileInfo () const
 
CodeViewContextgetCVContext ()
 
void setAllowTemporaryLabels (bool Value)
 
void setUseNamesOnTempLabels (bool Value)
 
char * getSecureLogFile ()
 
raw_fd_ostreamgetSecureLog ()
 
bool getSecureLogUsed ()
 
void setSecureLog (std::unique_ptr< raw_fd_ostream > Value)
 
void setSecureLogUsed (bool Value)
 
void * allocate (unsigned Size, unsigned Align=8)
 
void deallocate (void *Ptr)
 
bool hadError ()
 
void reportError (SMLoc L, const Twine &Msg)
 
LLVM_ATTRIBUTE_NORETURN void reportFatalError (SMLoc L, const Twine &Msg)
 
Module Lifetime Management
void reset ()
 reset - return object to right after construction state to prepare to process a new module More...
 
Symbol Management
MCSymbolcreateLinkerPrivateTempSymbol ()
 Create and return a new linker temporary symbol with a unique but unspecified name. More...
 
MCSymbolcreateTempSymbol (bool CanBeUnnamed=true)
 Create and return a new assembler temporary symbol with a unique but unspecified name. More...
 
MCSymbolcreateTempSymbol (const Twine &Name, bool AlwaysAddSuffix, bool CanBeUnnamed=true)
 
MCSymbolcreateDirectionalLocalSymbol (unsigned LocalLabelVal)
 Create the definition of a directional local symbol for numbered label (used for "1:" definitions). More...
 
MCSymbolgetDirectionalLocalSymbol (unsigned LocalLabelVal, bool Before)
 Create and return a directional local symbol for numbered label (used for "1b" or 1f" references). More...
 
MCSymbolgetOrCreateSymbol (const Twine &Name)
 Lookup the symbol inside with the specified Name. More...
 
MCSymbolELFgetOrCreateSectionSymbol (const MCSectionELF &Section)
 
MCSymbolgetOrCreateFrameAllocSymbol (StringRef FuncName, unsigned Idx)
 Gets a symbol that will be defined to the final stack offset of a local variable after codegen. More...
 
MCSymbolgetOrCreateParentFrameOffsetSymbol (StringRef FuncName)
 
MCSymbolgetOrCreateLSDASymbol (StringRef FuncName)
 
MCSymbollookupSymbol (const Twine &Name) const
 Get the symbol for Name, or null. More...
 
void setSymbolValue (MCStreamer &Streamer, StringRef Sym, uint64_t Val)
 Set value for a symbol. More...
 
const SymbolTablegetSymbols () const
 getSymbols - Get a reference for the symbol table for clients that want to, for example, iterate over all symbols. More...
 
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. More...
 
void setCompilationDir (StringRef S)
 Set the compilation directory for DW_AT_comp_dir. 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
 
MCDwarfLineTablegetMCDwarfLineTable (unsigned CUID)
 
const MCDwarfLineTablegetMCDwarfLineTable (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 MCDwarfLocgetCurrentDwarfLoc ()
 
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 ()
 
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. More...
 
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, const char *BeginSymName)
 
MCSectionELFgetELFSection (const Twine &Section, unsigned Type, unsigned Flags, unsigned EntrySize, const Twine &Group)
 
MCSectionELFgetELFSection (const Twine &Section, unsigned Type, unsigned Flags, unsigned EntrySize, const Twine &Group, const char *BeginSymName)
 
MCSectionELFgetELFSection (const Twine &Section, unsigned Type, unsigned Flags, unsigned EntrySize, const Twine &Group, unsigned UniqueID)
 
MCSectionELFgetELFSection (const Twine &Section, unsigned Type, unsigned Flags, unsigned EntrySize, const Twine &Group, unsigned UniqueID, const char *BeginSymName)
 
MCSectionELFgetELFSection (const Twine &Section, unsigned Type, unsigned Flags, unsigned EntrySize, const MCSymbolELF *Group, unsigned UniqueID, const char *BeginSymName, const MCSectionELF *Associated)
 
MCSectionELFgetELFNamedSection (const Twine &Prefix, const Twine &Suffix, unsigned Type, unsigned Flags, unsigned EntrySize=0)
 Get a section with the provided group identifier. More...
 
MCSectionELFcreateELFRelSection (const Twine &Name, unsigned Type, unsigned Flags, unsigned EntrySize, const MCSymbolELF *Group, const MCSectionELF *Associated)
 
void renameELFSection (MCSectionELF *Section, StringRef Name)
 
MCSectionELFcreateELFGroupSection (const MCSymbolELF *Group)
 
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)
 
MCSectionCOFFgetCOFFSection (StringRef Section)
 
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. More...
 
MCSubtargetInfogetSubtargetCopy (const MCSubtargetInfo &STI)
 

Detailed Description

Context object for machine code objects.

This class owns all of the sections that it creates.

Definition at line 51 of file MCContext.h.

Member Typedef Documentation

Definition at line 56 of file MCContext.h.

Member Enumeration Documentation

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 320 of file MCContext.h.

Constructor & Destructor Documentation

MCContext::MCContext ( const MCAsmInfo MAI,
const MCRegisterInfo MRI,
const MCObjectFileInfo MOFI,
const SourceMgr Mgr = nullptr,
bool  DoAutoReset = true 
)
explicit
MCContext::~MCContext ( )

Definition at line 62 of file MCContext.cpp.

References reset().

Member Function Documentation

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

Definition at line 513 of file MCContext.h.

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

Definition at line 521 of file MCContext.h.

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

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

Definition at line 499 of file MCContext.h.

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

MCSymbol * MCContext::createDirectionalLocalSymbol ( unsigned  LocalLabelVal)

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

Definition at line 244 of file MCContext.cpp.

MCSectionELF * MCContext::createELFGroupSection ( const MCSymbolELF Group)

Definition at line 389 of file MCContext.cpp.

References llvm::SectionKind::getReadOnly(), and llvm::ELF::SHT_GROUP.

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

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

Definition at line 212 of file MCContext.cpp.

References llvm::MCAsmInfo::getLinkerPrivateGlobalPrefix().

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

Definition at line 205 of file MCContext.cpp.

References llvm::MCAsmInfo::getPrivateGlobalPrefix().

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

Definition at line 550 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 495 of file MCContext.cpp.

References llvm::MCStreamer::mayHaveInstructions().

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

const MCAsmInfo* llvm::MCContext::getAsmInfo ( ) const
inline
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 444 of file MCContext.cpp.

References Characteristics, GenericSectionID, 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 getWinCFISection().

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

Definition at line 428 of file MCContext.cpp.

References GenericSectionID, and getCOFFSection().

MCSectionCOFF * MCContext::getCOFFSection ( StringRef  Section)

Definition at line 436 of file MCContext.cpp.

References GenericSectionID, and llvm::ARMBuildAttrs::Section.

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 430 of file MCContext.h.

Referenced by EmitGenDwarfAbbrev(), and EmitGenDwarfInfo().

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

Definition at line 502 of file MCContext.h.

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

CodeViewContext & MCContext::getCVContext ( )
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 249 of file MCContext.cpp.

unsigned llvm::MCContext::getDwarfCompileUnitID ( )
inline

Definition at line 476 of file MCContext.h.

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

StringRef llvm::MCContext::getDwarfDebugFlags ( )
inline

Definition at line 526 of file MCContext.h.

Referenced by EmitGenDwarfAbbrev(), and EmitGenDwarfInfo().

StringRef llvm::MCContext::getDwarfDebugProducer ( )
inline

Definition at line 529 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 477 of file MCContext.cpp.

References llvm::MCDwarfLineTable::getFile().

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

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

Definition at line 530 of file MCContext.h.

References llvm::dwarf::DWARF32.

bool llvm::MCContext::getDwarfLocSeen ( )
inline

Definition at line 501 of file MCContext.h.

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

uint16_t llvm::MCContext::getDwarfVersion ( ) const
inline
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 333 of file MCContext.cpp.

References getELFSection().

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

Definition at line 346 of file MCContext.h.

References getELFSection().

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

Definition at line 351 of file MCContext.h.

References getELFSection().

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

Definition at line 357 of file MCContext.h.

References getELFSection().

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

Definition at line 364 of file MCContext.h.

References getELFSection().

MCSectionELF * MCContext::getELFSection ( const Twine Section,
unsigned  Type,
unsigned  Flags,
unsigned  EntrySize,
const Twine Group,
unsigned  UniqueID,
const char *  BeginSymName 
)
MCSectionELF * MCContext::getELFSection ( const Twine Section,
unsigned  Type,
unsigned  Flags,
unsigned  EntrySize,
const MCSymbolELF Group,
unsigned  UniqueID,
const char *  BeginSymName,
const MCSectionELF Associated 
)
unsigned llvm::MCContext::getGenDwarfFileNumber ( )
inline

Definition at line 506 of file MCContext.h.

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

bool llvm::MCContext::getGenDwarfForAssembly ( )
inline

Definition at line 504 of file MCContext.h.

const SetVector<MCSection *>& llvm::MCContext::getGenDwarfSectionSyms ( )
inline
MCSectionMachO * MCContext::getMachOSection ( StringRef  Segment,
StringRef  Section,
unsigned  TypeAndAttributes,
unsigned  Reserved2,
SectionKind  K,
const char *  BeginSymName = nullptr 
)
MCSectionMachO* llvm::MCContext::getMachOSection ( StringRef  Segment,
StringRef  Section,
unsigned  TypeAndAttributes,
SectionKind  K,
const char *  BeginSymName = nullptr 
)
inline

Definition at line 334 of file MCContext.h.

References getMachOSection().

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 438 of file MCContext.h.

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

Definition at line 466 of file MCContext.h.

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

Referenced by EmitGenDwarfInfo().

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

Definition at line 457 of file MCContext.h.

References assert(), and I.

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

Definition at line 449 of file MCContext.h.

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

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

Definition at line 518 of file MCContext.h.

Referenced by EmitGenDwarfInfo().

const MCObjectFileInfo* llvm::MCContext::getObjectFileInfo ( ) const
inline
MCSymbol * MCContext::getOrCreateFrameAllocSymbol ( StringRef  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 .localescape.

Definition at line 139 of file MCContext.cpp.

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

MCSymbol * MCContext::getOrCreateLSDASymbol ( StringRef  FuncName)
MCSymbol * MCContext::getOrCreateParentFrameOffsetSymbol ( StringRef  FuncName)

Definition at line 145 of file MCContext.cpp.

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

Referenced by recoverFramePointer().

MCSymbolELF * MCContext::getOrCreateSectionSymbol ( const MCSectionELF Section)
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 114 of file MCContext.cpp.

References assert(), llvm::StringRef::empty(), and llvm::Twine::toStringRef().

Referenced by llvm::AsmPrinter::doFinalization(), llvm::AMDGPUTargetELFStreamer::EmitAMDGPUHsaModuleScopeGlobal(), llvm::AMDGPUTargetELFStreamer::EmitAMDGPUHsaProgramScopeGlobal(), llvm::AMDGPUTargetELFStreamer::EmitAMDGPUSymbolType(), EmitCamlGlobal(), llvm::MipsTargetELFStreamer::emitDirectiveCpLoad(), llvm::MipsTargetELFStreamer::emitDirectiveCpsetup(), llvm::MipsTargetELFStreamer::emitDirectiveEnd(), llvm::X86AsmPrinter::EmitEndOfAsmFile(), llvm::EHStreamer::emitExceptionTable(), llvm::AsmPrinter::EmitGlobalVariable(), llvm::X86AsmPrinter::EmitStartOfAsmFile(), llvm::WinException::endFunclet(), getCOFFSection(), llvm::MSP430MCInstLower::GetConstantPoolIndexSymbol(), llvm::LanaiMCInstLower::GetConstantPoolIndexSymbol(), llvm::AsmPrinter::GetCPISymbol(), getELFSection(), llvm::AsmPrinter::GetExternalSymbolSymbol(), llvm::PPCFunctionInfo::getGlobalEPSymbol(), getGlobalOffsetTable(), llvm::MachineFunction::getJTISymbol(), llvm::AsmPrinter::GetJTSetSymbol(), llvm::MSP430MCInstLower::GetJumpTableSymbol(), llvm::LanaiMCInstLower::GetJumpTableSymbol(), llvm::PPCFunctionInfo::getLocalEPSymbol(), getOrCreateFrameAllocSymbol(), getOrCreateLSDASymbol(), getOrCreateParentFrameOffsetSymbol(), llvm::MachineFunction::getPICBaseSymbol(), getPICLabel(), llvm::PPCFunctionInfo::getPICOffsetSymbol(), llvm::TargetMachine::getSymbol(), llvm::MachineBasicBlock::getSymbol(), GetSymbolFromOperand(), llvm::TargetLoweringObjectFile::getSymbolWithGlobalValueBase(), getTLSGetOffset(), llvm::PPCFunctionInfo::getTOCOffsetSymbol(), llvm::FastISel::lowerCallTo(), llvm::AMDGPUMCInstLower::lowerOperand(), llvm::MCParserUtils::parseAssignmentExpression(), printSymbolOperand(), llvm::FaultMaps::serializeToFaultMapSection(), llvm::StackMaps::serializeToStackMapSection(), llvm::FastISel::CallLoweringInfo::setCallee(), setSymbolValue(), smallData(), llvm::AArch64ExternalSymbolizer::tryAddingSymbolicOperand(), and llvm::MCExternalSymbolizer::tryAddingSymbolicOperand().

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

Definition at line 540 of file MCContext.h.

char* llvm::MCContext::getSecureLogFile ( )
inline

Definition at line 539 of file MCContext.h.

bool llvm::MCContext::getSecureLogUsed ( )
inline

Definition at line 541 of file MCContext.h.

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

Definition at line 241 of file MCContext.h.

Referenced by llvm::MCObjectStreamer::emitFill().

MCSubtargetInfo & MCContext::getSubtargetCopy ( const MCSubtargetInfo STI)
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 313 of file MCContext.h.

bool llvm::MCContext::hadError ( )
inline

Definition at line 552 of file MCContext.h.

bool llvm::MCContext::hasMCLineSections ( ) const
inline

Definition at line 470 of file MCContext.h.

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 485 of file MCContext.cpp.

References llvm::SmallVectorBase::empty(), getMCDwarfFiles(), and llvm::SmallVectorTemplateCommon< T >::size().

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

Get the symbol for Name, or null.

Definition at line 257 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 
)
void MCContext::reportError ( SMLoc  L,
const Twine Msg 
)
void MCContext::reportFatalError ( SMLoc  L,
const Twine Msg 
)

Definition at line 522 of file MCContext.cpp.

References reportError(), and llvm::sys::RunInterruptHandlers().

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::SmallVectorImpl< T >::clear(), llvm::StringMap< ValueTy, AllocatorTy >::clear(), DWARF2_FLAG_IS_STMT, and llvm::BumpPtrAllocatorImpl< AllocatorT, SlabSize, SizeThreshold >::Reset().

Referenced by llvm::MachineModuleInfo::doFinalization(), and ~MCContext().

void llvm::MCContext::setAllowTemporaryLabels ( bool  Value)
inline
void llvm::MCContext::setCompilationDir ( StringRef  S)
inline

Set the compilation directory for DW_AT_comp_dir.

Definition at line 433 of file MCContext.h.

References llvm::StringRef::str().

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 488 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().

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

Definition at line 477 of file MCContext.h.

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

Definition at line 525 of file MCContext.h.

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

Definition at line 528 of file MCContext.h.

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

Definition at line 534 of file MCContext.h.

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

Definition at line 507 of file MCContext.h.

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

Definition at line 505 of file MCContext.h.

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

Set the main file name and override the default.

Definition at line 441 of file MCContext.h.

void llvm::MCContext::setMCLineTableCompilationDir ( unsigned  CUID,
StringRef  CompilationDir 
)
inline
void llvm::MCContext::setSecureLog ( std::unique_ptr< raw_fd_ostream Value)
inline

Definition at line 542 of file MCContext.h.

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

Definition at line 545 of file MCContext.h.

void MCContext::setSymbolValue ( MCStreamer Streamer,
StringRef  Sym,
uint64_t  Val 
)
void llvm::MCContext::setUseNamesOnTempLabels ( bool  Value)
inline

Definition at line 252 of file MCContext.h.

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


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