class DebugInfoFinder
Declaration
class DebugInfoFinder { /* full declaration omitted */ };
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.
Declared at: llvm/include/llvm/IR/DebugInfo.h:90
Member Variables
- private SmallVector<llvm::DICompileUnit*, 8> CUs
- private SmallVector<llvm::DISubprogram*, 8> SPs
- private SmallVector<llvm::DIGlobalVariableExpression*, 8> GVs
- private SmallVector<llvm::DIType*, 8> TYs
- private SmallVector<llvm::DIScope*, 8> Scopes
- private SmallPtrSet<const llvm::MDNode*, 32> NodesSeen
Method Overview
- private bool addCompileUnit(llvm::DICompileUnit * CU)
- private bool addGlobalVariable(llvm::DIGlobalVariableExpression * DIG)
- private bool addScope(llvm::DIScope * Scope)
- private bool addSubprogram(llvm::DISubprogram * SP)
- private bool addType(llvm::DIType * DT)
- public unsigned int compile_unit_count() const
- public iterator_range<llvm::DebugInfoFinder::compile_unit_iterator> compile_units() const
- public unsigned int global_variable_count() const
- public iterator_range<llvm::DebugInfoFinder::global_variable_expression_iterator> global_variables() const
- private void processCompileUnit(llvm::DICompileUnit * CU)
- public void processInstruction(const llvm::Module & M, const llvm::Instruction & I)
- public void processLocation(const llvm::Module & M, const llvm::DILocation * Loc)
- public void processModule(const llvm::Module & M)
- private void processScope(llvm::DIScope * Scope)
- public void processSubprogram(llvm::DISubprogram * SP)
- private void processType(llvm::DIType * DT)
- public void processVariable(const llvm::Module & M, const llvm::DbgVariableIntrinsic & DVI)
- public void reset()
- public unsigned int scope_count() const
- public iterator_range<llvm::DebugInfoFinder::scope_iterator> scopes() const
- public unsigned int subprogram_count() const
- public iterator_range<llvm::DebugInfoFinder::subprogram_iterator> subprograms() const
- public unsigned int type_count() const
- public iterator_range<llvm::DebugInfoFinder::type_iterator> types() const
Methods
¶bool addCompileUnit(llvm::DICompileUnit* CU)
bool addCompileUnit(llvm::DICompileUnit* CU)
Declared at: llvm/include/llvm/IR/DebugInfo.h:112
Parameters
¶bool addGlobalVariable(
llvm::DIGlobalVariableExpression* DIG)
bool addGlobalVariable(
llvm::DIGlobalVariableExpression* DIG)
Declared at: llvm/include/llvm/IR/DebugInfo.h:113
Parameters
¶bool addScope(llvm::DIScope* Scope)
bool addScope(llvm::DIScope* Scope)
Declared at: llvm/include/llvm/IR/DebugInfo.h:114
Parameters
- llvm::DIScope* Scope
¶bool addSubprogram(llvm::DISubprogram* SP)
bool addSubprogram(llvm::DISubprogram* SP)
Declared at: llvm/include/llvm/IR/DebugInfo.h:115
Parameters
¶bool addType(llvm::DIType* DT)
bool addType(llvm::DIType* DT)
Declared at: llvm/include/llvm/IR/DebugInfo.h:116
Parameters
- llvm::DIType* DT
¶unsigned int compile_unit_count() const
unsigned int compile_unit_count() const
Declared at: llvm/include/llvm/IR/DebugInfo.h:147
¶iterator_range<
llvm::DebugInfoFinder::compile_unit_iterator>
compile_units() const
iterator_range<
llvm::DebugInfoFinder::compile_unit_iterator>
compile_units() const
Declared at: llvm/include/llvm/IR/DebugInfo.h:127
¶unsigned int global_variable_count() const
unsigned int global_variable_count() const
Declared at: llvm/include/llvm/IR/DebugInfo.h:148
¶iterator_range<
llvm::DebugInfoFinder::
global_variable_expression_iterator>
global_variables() const
iterator_range<
llvm::DebugInfoFinder::
global_variable_expression_iterator>
global_variables() const
Declared at: llvm/include/llvm/IR/DebugInfo.h:135
¶void processCompileUnit(llvm::DICompileUnit* CU)
void processCompileUnit(llvm::DICompileUnit* CU)
Declared at: llvm/include/llvm/IR/DebugInfo.h:109
Parameters
¶void processInstruction(
const llvm::Module& M,
const llvm::Instruction& I)
void processInstruction(
const llvm::Module& M,
const llvm::Instruction& I)
Description
Process a single instruction and collect debug info anchors.
Declared at: llvm/include/llvm/IR/DebugInfo.h:95
Parameters
- const llvm::Module& M
- const llvm::Instruction& I
¶void processLocation(const llvm::Module& M,
const llvm::DILocation* Loc)
void processLocation(const llvm::Module& M,
const llvm::DILocation* Loc)
Description
Process debug info location.
Declared at: llvm/include/llvm/IR/DebugInfo.h:100
Parameters
- const llvm::Module& M
- const llvm::DILocation* Loc
¶void processModule(const llvm::Module& M)
void processModule(const llvm::Module& M)
Description
Process entire module and collect debug info anchors.
Declared at: llvm/include/llvm/IR/DebugInfo.h:93
Parameters
- const llvm::Module& M
¶void processScope(llvm::DIScope* Scope)
void processScope(llvm::DIScope* Scope)
Declared at: llvm/include/llvm/IR/DebugInfo.h:110
Parameters
- llvm::DIScope* Scope
¶void processSubprogram(llvm::DISubprogram* SP)
void processSubprogram(llvm::DISubprogram* SP)
Description
Process subprogram.
Declared at: llvm/include/llvm/IR/DebugInfo.h:103
Parameters
¶void processType(llvm::DIType* DT)
void processType(llvm::DIType* DT)
Declared at: llvm/include/llvm/IR/DebugInfo.h:111
Parameters
- llvm::DIType* DT
¶void processVariable(
const llvm::Module& M,
const llvm::DbgVariableIntrinsic& DVI)
void processVariable(
const llvm::Module& M,
const llvm::DbgVariableIntrinsic& DVI)
Description
Process DbgVariableIntrinsic.
Declared at: llvm/include/llvm/IR/DebugInfo.h:98
Parameters
- const llvm::Module& M
- const llvm::DbgVariableIntrinsic& DVI
¶void reset()
void reset()
Description
Clear all lists.
Declared at: llvm/include/llvm/IR/DebugInfo.h:106
¶unsigned int scope_count() const
unsigned int scope_count() const
Declared at: llvm/include/llvm/IR/DebugInfo.h:151
¶iterator_range<
llvm::DebugInfoFinder::scope_iterator>
scopes() const
iterator_range<
llvm::DebugInfoFinder::scope_iterator>
scopes() const
Declared at: llvm/include/llvm/IR/DebugInfo.h:143
¶unsigned int subprogram_count() const
unsigned int subprogram_count() const
Declared at: llvm/include/llvm/IR/DebugInfo.h:149
¶iterator_range<
llvm::DebugInfoFinder::subprogram_iterator>
subprograms() const
iterator_range<
llvm::DebugInfoFinder::subprogram_iterator>
subprograms() const
Declared at: llvm/include/llvm/IR/DebugInfo.h:131
¶unsigned int type_count() const
unsigned int type_count() const
Declared at: llvm/include/llvm/IR/DebugInfo.h:150
¶iterator_range<
llvm::DebugInfoFinder::type_iterator>
types() const
iterator_range<
llvm::DebugInfoFinder::type_iterator>
types() const
Declared at: llvm/include/llvm/IR/DebugInfo.h:139