LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
llvm::DwarfDebug Class Reference

Collects and handles dwarf debug information. More...

#include <DwarfDebug.h>

Public Member Functions

 DwarfDebug (AsmPrinter *A, Module *M)
 
void insertDIE (const MDNode *TypeMD, DIE *Die)
 
DIEgetDIE (const MDNode *TypeMD)
 
void beginModule ()
 Emit all Dwarf sections that should come prior to the content. More...
 
void endModule ()
 Emit all Dwarf sections that should come after the content. More...
 
void beginFunction (const MachineFunction *MF)
 Gather pre-function debug information. More...
 
void endFunction (const MachineFunction *MF)
 Gather and emit post-function debug information. More...
 
void beginInstruction (const MachineInstr *MI)
 Process beginning of an instruction. More...
 
void endInstruction (const MachineInstr *MI)
 Process end of an instruction. More...
 
void addTypeUnitType (DIE *Die)
 Add a DIE to the set of types that we're going to pull into type units. More...
 
void addArangeLabel (SymbolCU SCU)
 Add a label so that arange data can be generated for it. More...
 
void setSymbolSize (const MCSymbol *Sym, uint64_t Size)
 For symbols that have a size designated (e.g. common symbols), this tracks that size. More...
 
unsigned getOrCreateSourceID (StringRef DirName, StringRef FullName, unsigned CUID)
 Look up the source id with the given directory and source file names. If none currently exists, create a new id and insert it in the SourceIds map. More...
 
void emitDIE (DIE *Die, ArrayRef< DIEAbbrev * > Abbrevs)
 Recursively Emits a debug information entry. More...
 
bool useDwarfAccelTables ()
 Returns whether or not to emit tables that dwarf consumers can use to accelerate lookup. More...
 
bool useSplitDwarf ()
 Returns whether or not to change the current debug info for the split dwarf proposal support. More...
 
unsigned getDwarfVersion () const
 Returns the Dwarf Version. More...
 
template<typename T >
T resolve (DIRef< T > Ref) const
 Find the MDNode for the given reference. More...
 
bool isSubprogramContext (const MDNode *Context)
 

Detailed Description

Collects and handles dwarf debug information.

Definition at line 313 of file DwarfDebug.h.

Constructor & Destructor Documentation

DwarfDebug::DwarfDebug ( AsmPrinter A,
Module M 
)

Member Function Documentation

void llvm::DwarfDebug::addArangeLabel ( SymbolCU  SCU)
inline

Add a label so that arange data can be generated for it.

Definition at line 701 of file DwarfDebug.h.

Referenced by llvm::CompileUnit::addLabelAddress(), and llvm::CompileUnit::addOpAddress().

void llvm::DwarfDebug::addTypeUnitType ( DIE Die)
inline

Add a DIE to the set of types that we're going to pull into type units.

Definition at line 698 of file DwarfDebug.h.

void DwarfDebug::beginFunction ( const MachineFunction MF)

Gather pre-function debug information.

Definition at line 1592 of file DwarfDebug.cpp.

References llvm::SmallVectorTemplateCommon< T >::back(), llvm::MachineFunction::back(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::begin(), llvm::MachineFunction::begin(), llvm::dbgs(), DEBUG, DWARF2_FLAG_IS_STMT, llvm::MCStreamer::EmitLabel(), llvm::SmallVectorBase::empty(), llvm::LexicalScopes::empty(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::empty(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::end(), llvm::MachineBasicBlock::end(), llvm::MachineFunction::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::find(), llvm::MachineInstr::FrameSetup, llvm::DebugLoc::getCol(), llvm::Function::getContext(), llvm::MCStreamer::getContext(), llvm::DIVariable::getContext(), llvm::LexicalScopes::getCurrentFunctionScope(), llvm::MachineInstr::getDebugLoc(), llvm::getDISubprogram(), llvm::MachineInstr::getFlag(), getFnDebugLoc(), llvm::MachineFunction::getFunction(), llvm::AsmPrinter::getFunctionNumber(), llvm::MachineBasicBlock::getLastNonDebugInstr(), llvm::DebugLoc::getLine(), llvm::MachineInstr::getNumOperands(), llvm::MCRegisterInfo::getNumRegs(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getReg(), llvm::TargetMachine::getRegisterInfo(), llvm::DebugLoc::getScope(), llvm::LexicalScope::getScopeNode(), llvm::DIDescriptor::getTag(), llvm::AsmPrinter::GetTempSymbol(), llvm::CompileUnit::getUniqueID(), llvm::MachineModuleInfo::hasDebugInfo(), llvm::TargetMachine::hasMCUseLoc(), llvm::MCStreamer::hasRawTextSupport(), I, llvm::ARM_PROC::IE, llvm::LexicalScopes::initialize(), isDbgValueInDefinedReg(), llvm::MachineInstr::isDebugValue(), llvm::MachineInstr::isIdenticalTo(), llvm::MachineInstr::isLabel(), llvm::DebugLoc::isUnknown(), llvm::MCRegAliasIterator::isValid(), llvm::DIDescriptor::isVariable(), llvm::A64CC::MI, llvm::next(), llvm::MachineInstr::operands_begin(), llvm::MachineInstr::operands_end(), llvm::AsmPrinter::OutStreamer, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::pop_back(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::MCContext::setDwarfCompileUnitID(), llvm::SmallVectorTemplateCommon< T >::size(), and llvm::AsmPrinter::TM.

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

void DwarfDebug::beginInstruction ( const MachineInstr MI)
void DwarfDebug::beginModule ( )
void DwarfDebug::emitDIE ( DIE Die,
ArrayRef< DIEAbbrev * >  Abbrevs 
)
void DwarfDebug::endFunction ( const MachineFunction MF)
void DwarfDebug::endInstruction ( const MachineInstr MI)
void DwarfDebug::endModule ( )
DIE* llvm::DwarfDebug::getDIE ( const MDNode TypeMD)
inline

Definition at line 673 of file DwarfDebug.h.

Referenced by llvm::CompileUnit::getDIE().

unsigned llvm::DwarfDebug::getDwarfVersion ( ) const
inline
unsigned DwarfDebug::getOrCreateSourceID ( StringRef  DirName,
StringRef  FullName,
unsigned  CUID 
)

Look up the source id with the given directory and source file names. If none currently exists, create a new id and insert it in the SourceIds map.

Definition at line 677 of file DwarfDebug.cpp.

References llvm::MCStreamer::EmitDwarfFileDirective(), llvm::StringRef::empty(), llvm::StringMapEntry< ValueTy >::getValue(), llvm::TargetMachine::hasMCUseLoc(), llvm::MCStreamer::hasRawTextSupport(), llvm::AsmPrinter::OutStreamer, llvm::AsmPrinter::TM, and llvm::utostr().

Referenced by llvm::CompileUnit::addSourceLine().

void llvm::DwarfDebug::insertDIE ( const MDNode TypeMD,
DIE Die 
)
inline

Definition at line 670 of file DwarfDebug.h.

Referenced by llvm::CompileUnit::insertDIE().

bool DwarfDebug::isSubprogramContext ( const MDNode Context)

isSubprogramContext - Return true if Context is either a subprogram or another context nested inside a subprogram.

Definition at line 355 of file DwarfDebug.cpp.

References llvm::DIDescriptor::isSubprogram(), llvm::DIDescriptor::isType(), and resolve().

Referenced by llvm::CompileUnit::createGlobalVariableDIE().

template<typename T >
T llvm::DwarfDebug::resolve ( DIRef< T Ref) const
inline

Find the MDNode for the given reference.

Definition at line 730 of file DwarfDebug.h.

References llvm::DIRef< T >::resolve().

Referenced by getBaseTypeSize(), isSubprogramContext(), isTypeSigned(), isTypeUnitScoped(), and isUnsignedDIType().

void llvm::DwarfDebug::setSymbolSize ( const MCSymbol Sym,
uint64_t  Size 
)
inline

For symbols that have a size designated (e.g. common symbols), this tracks that size.

Definition at line 705 of file DwarfDebug.h.

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

bool llvm::DwarfDebug::useDwarfAccelTables ( )
inline

Returns whether or not to emit tables that dwarf consumers can use to accelerate lookup.

Definition at line 720 of file DwarfDebug.h.

Referenced by endModule().

bool llvm::DwarfDebug::useSplitDwarf ( )
inline

Returns whether or not to change the current debug info for the split dwarf proposal support.

Definition at line 724 of file DwarfDebug.h.

Referenced by llvm::CompileUnit::addLabelAddress(), llvm::CompileUnit::addOpAddress(), llvm::CompileUnit::addString(), llvm::CompileUnit::createGlobalVariableDIE(), emitDIE(), and endModule().


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