summaryrefslogtreecommitdiff
path: root/include/llvm/DebugInfo.h
diff options
context:
space:
mode:
authorManman Ren <manman.ren@gmail.com>2013-08-01 20:52:39 +0000
committerManman Ren <manman.ren@gmail.com>2013-08-01 20:52:39 +0000
commitf589eef8645219dbcd1a4eec85ffb34a067534a6 (patch)
tree578ff6ab4a2d6c71ab726a6c6c1482ad72dd90ed /include/llvm/DebugInfo.h
parentc8b93557da150e051c273701652a2db328708708 (diff)
downloadllvm-f589eef8645219dbcd1a4eec85ffb34a067534a6.tar.gz
llvm-f589eef8645219dbcd1a4eec85ffb34a067534a6.tar.bz2
llvm-f589eef8645219dbcd1a4eec85ffb34a067534a6.tar.xz
Debug Info Finder|Verifier: handle DbgLoc attached to instructions.
Also remove checking of llvm.dbg.sp since it is not used in generating dwarf. Current state of Finder: DebugInfoFinder tries to list all debug info MDNodes used in a module. To list debug info MDNodes used by an instruction, DebugInfoFinder provides 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. TODO: 1> Finder has a list of CUs, SPs, Types, Scopes and global variables. We need to add a list of variables that are used by DbgDeclareInst and DbgValueInst. 2> MDString fields should be null or isa<MDString> and MDNode fields should be null or isa<MDNode>. We currently use empty string or int 0 to represent null. 3> Go though Verify functions and make sure that they check field types. 4> Clean up existing testing cases to remove llvm.dbg.sp and make sure each testing case has a llvm.dbg.cu. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187609 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/DebugInfo.h')
-rw-r--r--include/llvm/DebugInfo.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/llvm/DebugInfo.h b/include/llvm/DebugInfo.h
index 9fb12f8feb..f7e6434b4d 100644
--- a/include/llvm/DebugInfo.h
+++ b/include/llvm/DebugInfo.h
@@ -717,10 +717,12 @@ namespace llvm {
/// cleanseInlinedVariable - Remove inlined scope from the variable.
DIVariable cleanseInlinedVariable(MDNode *DV, LLVMContext &VMContext);
- /// DebugInfoFinder tries to list all debug info MDNodes in a module. To
+ /// DebugInfoFinder tries to list all debug info MDNodes used in a module. To
/// list debug info MDNodes used by an instruction, DebugInfoFinder uses
- /// processDeclare and processValue. processModule will go through
- /// all DICompileUnits and list debug info MDNodes used by the CUs.
+ /// 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.
class DebugInfoFinder {
public:
/// processModule - Process entire module and collect debug info
@@ -731,6 +733,8 @@ namespace llvm {
void processDeclare(const DbgDeclareInst *DDI);
/// Process DbgValueInst.
void processValue(const DbgValueInst *DVI);
+ /// processLocation - Process DILocation.
+ void processLocation(DILocation Loc);
/// Clear all lists.
void reset();
@@ -744,9 +748,6 @@ namespace llvm {
/// processSubprogram - Process DISubprogram.
void processSubprogram(DISubprogram SP);
- /// processLocation - Process DILocation.
- void processLocation(DILocation Loc);
-
void processScope(DIScope Scope);
/// addCompileUnit - Add compile unit into CUs.