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

Methods

bool addCompileUnit(llvm::DICompileUnit* CU)

Declared at: llvm/include/llvm/IR/DebugInfo.h:112

Parameters

llvm::DICompileUnit* CU

bool addGlobalVariable(
    llvm::DIGlobalVariableExpression* DIG)

Declared at: llvm/include/llvm/IR/DebugInfo.h:113

Parameters

llvm::DIGlobalVariableExpression* DIG

bool addScope(llvm::DIScope* Scope)

Declared at: llvm/include/llvm/IR/DebugInfo.h:114

Parameters

llvm::DIScope* Scope

bool addSubprogram(llvm::DISubprogram* SP)

Declared at: llvm/include/llvm/IR/DebugInfo.h:115

Parameters

llvm::DISubprogram* SP

bool addType(llvm::DIType* DT)

Declared at: llvm/include/llvm/IR/DebugInfo.h:116

Parameters

llvm::DIType* DT

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

Declared at: llvm/include/llvm/IR/DebugInfo.h:127

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

Declared at: llvm/include/llvm/IR/DebugInfo.h:135

void processCompileUnit(llvm::DICompileUnit* CU)

Declared at: llvm/include/llvm/IR/DebugInfo.h:109

Parameters

llvm::DICompileUnit* CU

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)

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)

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)

Declared at: llvm/include/llvm/IR/DebugInfo.h:110

Parameters

llvm::DIScope* Scope

void processSubprogram(llvm::DISubprogram* SP)

Description

Process subprogram.

Declared at: llvm/include/llvm/IR/DebugInfo.h:103

Parameters

llvm::DISubprogram* SP

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)

Description

Process DbgVariableIntrinsic.

Declared at: llvm/include/llvm/IR/DebugInfo.h:98

Parameters

const llvm::Module& M
const llvm::DbgVariableIntrinsic& DVI

void reset()

Description

Clear all lists.

Declared at: llvm/include/llvm/IR/DebugInfo.h:106

unsigned int scope_count() const

Declared at: llvm/include/llvm/IR/DebugInfo.h:151

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

Declared at: llvm/include/llvm/IR/DebugInfo.h:143

unsigned int subprogram_count() const

Declared at: llvm/include/llvm/IR/DebugInfo.h:149

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

Declared at: llvm/include/llvm/IR/DebugInfo.h:131

unsigned int type_count() const

Declared at: llvm/include/llvm/IR/DebugInfo.h:150

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

Declared at: llvm/include/llvm/IR/DebugInfo.h:139