LLVM API Documentation

llvm::MachineDebugInfo Class Reference

#include <MachineDebugInfo.h>

Inheritance diagram for llvm::MachineDebugInfo:

Inheritance graph
[legend]
Collaboration diagram for llvm::MachineDebugInfo:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MachineDebugInfo ()
 ~MachineDebugInfo ()
bool doInitialization ()
bool doFinalization ()
void BeginFunction (MachineFunction *MF)
void EndFunction ()
DebugInfoDescgetDescFor (Value *V)
bool Verify (Value *V)
void AnalyzeModule (Module &M)
bool hasInfo () const
unsigned NextLabelID ()
unsigned RecordLabel (unsigned Line, unsigned Column, unsigned Source)
unsigned RecordSource (const std::string &Directory, const std::string &Source)
unsigned RecordSource (const CompileUnitDesc *CompileUnit)
const UniqueVector< std::string > & getDirectories () const
const UniqueVector< SourceFileInfo > & getSourceFiles () const
const std::vector< SourceLineInfo * > & getSourceLines () const
void SetupCompileUnits (Module &M)
const UniqueVector< CompileUnitDesc * > getCompileUnits () const
std::vector< GlobalVariable * > getGlobalVariablesUsing (Module &M, const std::string &RootName)
template<class T>
std::vector< T * > getAnchoredDescriptors (Module &M)
unsigned RecordRegionStart (Value *V)
unsigned RecordRegionEnd (Value *V)
void RecordVariable (Value *V, unsigned FrameIndex)
DebugScopegetRootScope ()
DebugScopegetOrCreateScope (DebugInfoDesc *ScopeDesc)
std::vector< MachineMove * > & getFrameMoves ()

Detailed Description

MachineDebugInfo - This class contains debug information specific to a module. Queries can be made by different debugging schemes and reformated for specific use.

Definition at line 918 of file MachineDebugInfo.h.


Constructor & Destructor Documentation

MachineDebugInfo::MachineDebugInfo (  ) 

Definition at line 1432 of file MachineDebugInfo.cpp.

MachineDebugInfo::~MachineDebugInfo (  ) 

Definition at line 1444 of file MachineDebugInfo.cpp.


Member Function Documentation

void MachineDebugInfo::AnalyzeModule ( Module M  ) 

AnalyzeModule - Scan the module for global debug information.

Definition at line 1496 of file MachineDebugInfo.cpp.

References M, and SetupCompileUnits().

void MachineDebugInfo::BeginFunction ( MachineFunction MF  ) 

BeginFunction - Begin gathering function debug information.

Definition at line 1462 of file MachineDebugInfo.cpp.

Referenced by llvm::DwarfWriter::BeginFunction().

bool MachineDebugInfo::doFinalization (  ) 

doFinalization - Tear down the debug state after completion of a module.

Definition at line 1456 of file MachineDebugInfo.cpp.

bool MachineDebugInfo::doInitialization (  ) 

doInitialization - Initialize the debug state for a new module.

Definition at line 1450 of file MachineDebugInfo.cpp.

void MachineDebugInfo::EndFunction (  ) 

EndFunction - Discard function debug information.

Definition at line 1468 of file MachineDebugInfo.cpp.

Referenced by llvm::DwarfWriter::EndFunction().

template<class T>
std::vector<T *> llvm::MachineDebugInfo::getAnchoredDescriptors ( Module M  )  [inline]

getAnchoredDescriptors - Return a vector of anchored debug descriptors.

Definition at line 1035 of file MachineDebugInfo.h.

References llvm::CompileUnitDesc::DebugVersionFromGlobal(), llvm::DIDeserializer::Deserialize(), getGlobalVariablesUsing(), GV, llvm::LLVMDebugVersion, M, T, and llvm::DebugInfoDesc::TagFromGlobal().

const UniqueVector< CompileUnitDesc * > MachineDebugInfo::getCompileUnits (  )  const

getCompileUnits - Return a vector of debug compile units.

Definition at line 1512 of file MachineDebugInfo.cpp.

DebugInfoDesc * MachineDebugInfo::getDescFor ( Value V  ) 

getDescFor - Convert a Value to a debug information descriptor.

Definition at line 1484 of file MachineDebugInfo.cpp.

References llvm::DIDeserializer::Deserialize(), and V.

Referenced by llvm::SelectionDAGLowering::visitIntrinsicCall().

const UniqueVector<std::string>& llvm::MachineDebugInfo::getDirectories (  )  const [inline]

getDirectories - Return the UniqueVector of std::string representing directories.

Definition at line 1004 of file MachineDebugInfo.h.

std::vector<MachineMove *>& llvm::MachineDebugInfo::getFrameMoves (  )  [inline]

getFrameMoves - Returns a reference to a list of moves done in the current function's prologue. Used to construct frame maps for debug comsumers.

Definition at line 1080 of file MachineDebugInfo.h.

Referenced by llvm::PPCRegisterInfo::emitPrologue().

std::vector< GlobalVariable * > MachineDebugInfo::getGlobalVariablesUsing ( Module M,
const std::string &  RootName 
)

getGlobalVariablesUsing - Return all of the GlobalVariables that use the named GlobalVariable.

Definition at line 1519 of file MachineDebugInfo.cpp.

References getGlobalVariablesUsing(), and M.

Referenced by getAnchoredDescriptors().

DebugScope * MachineDebugInfo::getOrCreateScope ( DebugInfoDesc ScopeDesc  ) 

getOrCreateScope - Returns the scope associated with the given descriptor.

Definition at line 1579 of file MachineDebugInfo.cpp.

References llvm::DebugScope::AddScope(), and Slot.

Referenced by RecordRegionEnd(), RecordRegionStart(), and RecordVariable().

DebugScope* llvm::MachineDebugInfo::getRootScope (  )  [inline]

getRootScope - Return current functions root scope.

Definition at line 1072 of file MachineDebugInfo.h.

Referenced by llvm::DwarfWriter::EndFunction().

const UniqueVector<SourceFileInfo>& llvm::MachineDebugInfo::getSourceFiles (  )  const [inline]

getSourceFiles - Return the UniqueVector of source files.

Definition at line 1010 of file MachineDebugInfo.h.

const std::vector<SourceLineInfo *>& llvm::MachineDebugInfo::getSourceLines (  )  const [inline]

getSourceLines - Return a vector of source lines. Vector index + 1 equals label ID.

Definition at line 1016 of file MachineDebugInfo.h.

bool llvm::MachineDebugInfo::hasInfo (  )  const [inline]

hasInfo - Returns true if valid debug info is present.

Definition at line 985 of file MachineDebugInfo.h.

Referenced by llvm::PPCRegisterInfo::emitPrologue().

unsigned llvm::MachineDebugInfo::NextLabelID (  )  [inline]

NextLabelID - Return the next unique label id.

Definition at line 989 of file MachineDebugInfo.h.

Referenced by llvm::PPCRegisterInfo::emitPrologue(), RecordLabel(), RecordRegionEnd(), and RecordRegionStart().

unsigned MachineDebugInfo::RecordLabel ( unsigned  Line,
unsigned  Column,
unsigned  Source 
)

RecordLabel - Records location information and associates it with a debug label. Returns a unique label ID used to generate a label and provide correspondence to the source line list.

Definition at line 1527 of file MachineDebugInfo.cpp.

References NextLabelID().

unsigned MachineDebugInfo::RecordRegionEnd ( Value V  ) 

RecordRegionEnd - Indicate the end of a region.

Definition at line 1559 of file MachineDebugInfo.cpp.

References llvm::DIDeserializer::Deserialize(), getOrCreateScope(), NextLabelID(), llvm::DebugScope::setEndLabelID(), and V.

Referenced by llvm::SelectionDAGLowering::visitIntrinsicCall().

unsigned MachineDebugInfo::RecordRegionStart ( Value V  ) 

RecordRegionStart - Indicate the start of a region.

Definition at line 1548 of file MachineDebugInfo.cpp.

References llvm::DIDeserializer::Deserialize(), getOrCreateScope(), llvm::DebugScope::getStartLabelID(), NextLabelID(), llvm::DebugScope::setStartLabelID(), and V.

Referenced by llvm::SelectionDAGLowering::visitIntrinsicCall().

unsigned MachineDebugInfo::RecordSource ( const CompileUnitDesc CompileUnit  ) 

Definition at line 1541 of file MachineDebugInfo.cpp.

References llvm::CompileUnitDesc::getDirectory(), llvm::CompileUnitDesc::getFileName(), and RecordSource().

unsigned MachineDebugInfo::RecordSource ( const std::string &  Directory,
const std::string &  Source 
)

RecordSource - Register a source file with debug info. Returns an source ID.

Definition at line 1536 of file MachineDebugInfo.cpp.

References llvm::UniqueVector< T >::insert().

Referenced by RecordSource().

void MachineDebugInfo::RecordVariable ( Value V,
unsigned  FrameIndex 
)

RecordVariable - Indicate the declaration of a local variable.

Definition at line 1570 of file MachineDebugInfo.cpp.

References llvm::DIDeserializer::Deserialize(), llvm::VariableDesc::getContext(), getOrCreateScope(), and V.

Referenced by llvm::SelectionDAGLowering::visitIntrinsicCall().

void MachineDebugInfo::SetupCompileUnits ( Module M  ) 

SetupCompileUnits - Set up the unique vector of compile units.

Definition at line 1502 of file MachineDebugInfo.cpp.

References M.

Referenced by AnalyzeModule().

bool MachineDebugInfo::Verify ( Value V  ) 

Verify - Verify that a Value is debug information descriptor.

Definition at line 1490 of file MachineDebugInfo.cpp.

References V, and llvm::DIVerifier::Verify().

Referenced by llvm::SelectionDAGLowering::visitIntrinsicCall().


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