LLVM 17.0.0git
|
Utility to find all debug info in a module. More...
#include "llvm/IR/DebugInfo.h"
Public Types | |
using | compile_unit_iterator = SmallVectorImpl< DICompileUnit * >::const_iterator |
using | subprogram_iterator = SmallVectorImpl< DISubprogram * >::const_iterator |
using | global_variable_expression_iterator = SmallVectorImpl< DIGlobalVariableExpression * >::const_iterator |
using | type_iterator = SmallVectorImpl< DIType * >::const_iterator |
using | scope_iterator = SmallVectorImpl< DIScope * >::const_iterator |
Public Member Functions | |
void | processModule (const Module &M) |
Process entire module and collect debug info anchors. | |
void | processInstruction (const Module &M, const Instruction &I) |
Process a single instruction and collect debug info anchors. | |
void | processVariable (const Module &M, const DbgVariableIntrinsic &DVI) |
Process DbgVariableIntrinsic. | |
void | processLocation (const Module &M, const DILocation *Loc) |
Process debug info location. | |
void | processSubprogram (DISubprogram *SP) |
Process subprogram. | |
void | reset () |
Clear all lists. | |
iterator_range< compile_unit_iterator > | compile_units () const |
iterator_range< subprogram_iterator > | subprograms () const |
iterator_range< global_variable_expression_iterator > | global_variables () const |
iterator_range< type_iterator > | types () const |
iterator_range< scope_iterator > | scopes () const |
unsigned | compile_unit_count () const |
unsigned | global_variable_count () const |
unsigned | subprogram_count () const |
unsigned | type_count () const |
unsigned | scope_count () const |
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 93 of file DebugInfo.h.
using llvm::DebugInfoFinder::compile_unit_iterator = SmallVectorImpl<DICompileUnit *>::const_iterator |
Definition at line 122 of file DebugInfo.h.
using llvm::DebugInfoFinder::global_variable_expression_iterator = SmallVectorImpl<DIGlobalVariableExpression *>::const_iterator |
Definition at line 125 of file DebugInfo.h.
Definition at line 128 of file DebugInfo.h.
Definition at line 124 of file DebugInfo.h.
Definition at line 127 of file DebugInfo.h.
|
inline |
Definition at line 150 of file DebugInfo.h.
|
inline |
Definition at line 130 of file DebugInfo.h.
References llvm::make_range().
Referenced by printModuleDebugInfo(), and stripDeadDebugInfoImpl().
|
inline |
Definition at line 151 of file DebugInfo.h.
|
inline |
Definition at line 138 of file DebugInfo.h.
References llvm::make_range().
Referenced by printModuleDebugInfo().
void DebugInfoFinder::processInstruction | ( | const Module & | M, |
const Instruction & | I | ||
) |
Process a single instruction and collect debug info anchors.
Definition at line 183 of file DebugInfo.cpp.
References I, processLocation(), and processVariable().
Referenced by llvm::CloneBasicBlock(), processModule(), and stripDeadDebugInfoImpl().
void DebugInfoFinder::processLocation | ( | const Module & | M, |
const DILocation * | Loc | ||
) |
Process debug info location.
Definition at line 192 of file DebugInfo.cpp.
References processLocation().
Referenced by processInstruction(), and processLocation().
Process entire module and collect debug info anchors.
Definition at line 139 of file DebugInfo.cpp.
References F, I, processInstruction(), and processSubprogram().
Referenced by llvm::ModuleDebugInfoPrinterPass::run().
void DebugInfoFinder::processSubprogram | ( | DISubprogram * | SP | ) |
Process subprogram.
Definition at line 249 of file DebugInfo.cpp.
References llvm::DIScope::getScope().
Referenced by processModule(), and stripDeadDebugInfoImpl().
void DebugInfoFinder::processVariable | ( | const Module & | M, |
const DbgVariableIntrinsic & | DVI | ||
) |
Process DbgVariableIntrinsic.
Definition at line 272 of file DebugInfo.cpp.
References llvm::DbgVariableIntrinsic::getVariable(), and N.
Referenced by processInstruction().
void DebugInfoFinder::reset | ( | ) |
Clear all lists.
Definition at line 130 of file DebugInfo.cpp.
|
inline |
Definition at line 154 of file DebugInfo.h.
|
inline |
Definition at line 146 of file DebugInfo.h.
References llvm::make_range().
|
inline |
Definition at line 152 of file DebugInfo.h.
|
inline |
Definition at line 134 of file DebugInfo.h.
References llvm::make_range().
Referenced by printModuleDebugInfo().
|
inline |
Definition at line 153 of file DebugInfo.h.
|
inline |
Definition at line 142 of file DebugInfo.h.
References llvm::make_range().
Referenced by printModuleDebugInfo().