LLVM  3.7.0
Public Types | Public Member Functions | List of all members
llvm::DebugInfoFinder Class Reference

Utility to find all debug info in a module. More...

#include <DebugInfo.h>

Public Types

typedef SmallVectorImpl
< DICompileUnit * >
::const_iterator 
compile_unit_iterator
 
typedef SmallVectorImpl
< DISubprogram * >
::const_iterator 
subprogram_iterator
 
typedef SmallVectorImpl
< DIGlobalVariable * >
::const_iterator 
global_variable_iterator
 
typedef SmallVectorImpl
< DIType * >::const_iterator 
type_iterator
 
typedef SmallVectorImpl
< DIScope * >::const_iterator 
scope_iterator
 

Public Member Functions

 DebugInfoFinder ()
 
void processModule (const Module &M)
 Process entire module and collect debug info anchors. More...
 
void processDeclare (const Module &M, const DbgDeclareInst *DDI)
 Process DbgDeclareInst. More...
 
void processValue (const Module &M, const DbgValueInst *DVI)
 Process DbgValueInst. More...
 
void processLocation (const Module &M, const DILocation *Loc)
 Process debug info location. More...
 
void reset ()
 Clear all lists. More...
 
iterator_range
< compile_unit_iterator
compile_units () const
 
iterator_range
< subprogram_iterator
subprograms () const
 
iterator_range
< global_variable_iterator
global_variables () const
 
iterator_range< type_iteratortypes () const
 
iterator_range< scope_iteratorscopes () const
 
unsigned compile_unit_count () const
 
unsigned global_variable_count () const
 
unsigned subprogram_count () const
 
unsigned type_count () const
 
unsigned scope_count () const
 

Detailed Description

Utility to find all debug info in a module.

DebugInfoFinder tries to list all debug info MDNodes used in a module. To list debug info MDNodes used by an instruction, DebugInfoFinder uses processDeclare, processValue and processLocation to handle DbgDeclareInst, DbgValueInst and DbgLoc attached to instructions. processModule will go through all DICompileUnits in llvm.dbg.cu and list debug info MDNodes used by the CUs.

Definition at line 72 of file DebugInfo.h.

Member Typedef Documentation

Definition at line 103 of file DebugInfo.h.

Definition at line 106 of file DebugInfo.h.

Definition at line 108 of file DebugInfo.h.

Definition at line 104 of file DebugInfo.h.

Definition at line 107 of file DebugInfo.h.

Constructor & Destructor Documentation

llvm::DebugInfoFinder::DebugInfoFinder ( )
inline

Definition at line 74 of file DebugInfo.h.

Member Function Documentation

unsigned llvm::DebugInfoFinder::compile_unit_count ( ) const
inline

Definition at line 130 of file DebugInfo.h.

iterator_range<compile_unit_iterator> llvm::DebugInfoFinder::compile_units ( ) const
inline

Definition at line 110 of file DebugInfo.h.

Referenced by CloneDebugInfoMetadata().

unsigned llvm::DebugInfoFinder::global_variable_count ( ) const
inline

Definition at line 131 of file DebugInfo.h.

iterator_range<global_variable_iterator> llvm::DebugInfoFinder::global_variables ( ) const
inline

Definition at line 118 of file DebugInfo.h.

void DebugInfoFinder::processDeclare ( const Module M,
const DbgDeclareInst DDI 
)

Process DbgDeclareInst.

Definition at line 225 of file DebugInfo.cpp.

References llvm::dyn_cast(), llvm::DbgDeclareInst::getVariable(), and N.

void DebugInfoFinder::processLocation ( const Module M,
const DILocation Loc 
)

Process debug info location.

Definition at line 155 of file DebugInfo.cpp.

void DebugInfoFinder::processModule ( const Module M)

Process entire module and collect debug info anchors.

Definition at line 122 of file DebugInfo.cpp.

References llvm::Module::getNamedMetadata(), and llvm::SP.

Referenced by CloneDebugInfoMetadata().

void DebugInfoFinder::processValue ( const Module M,
const DbgValueInst DVI 
)

Process DbgValueInst.

Definition at line 242 of file DebugInfo.cpp.

References llvm::dyn_cast(), llvm::DbgValueInst::getVariable(), and N.

void DebugInfoFinder::reset ( )

Clear all lists.

Definition at line 103 of file DebugInfo.cpp.

unsigned llvm::DebugInfoFinder::scope_count ( ) const
inline

Definition at line 134 of file DebugInfo.h.

iterator_range<scope_iterator> llvm::DebugInfoFinder::scopes ( ) const
inline

Definition at line 126 of file DebugInfo.h.

unsigned llvm::DebugInfoFinder::subprogram_count ( ) const
inline

Definition at line 132 of file DebugInfo.h.

iterator_range<subprogram_iterator> llvm::DebugInfoFinder::subprograms ( ) const
inline

Definition at line 114 of file DebugInfo.h.

Referenced by FindSubprogram().

unsigned llvm::DebugInfoFinder::type_count ( ) const
inline

Definition at line 133 of file DebugInfo.h.

iterator_range<type_iterator> llvm::DebugInfoFinder::types ( ) const
inline

Definition at line 122 of file DebugInfo.h.


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