summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorManman Ren <manman.ren@gmail.com>2013-08-06 19:38:43 +0000
committerManman Ren <manman.ren@gmail.com>2013-08-06 19:38:43 +0000
commitb75e0c92f3e25cadcf774bd9b98e4b6afc171087 (patch)
treeea653cd847dca5b5f69c03564ab7a64d7a521ff2 /llvm/include
parent1cbbcf1c9395381313420a1668e700092b7c9261 (diff)
downloadbcm5719-llvm-b75e0c92f3e25cadcf774bd9b98e4b6afc171087.tar.gz
bcm5719-llvm-b75e0c92f3e25cadcf774bd9b98e4b6afc171087.zip
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. Re-apply r187609 with fix to pass ocaml binding. vmcore.ml generates a debug location with scope being metadata !{}, in verifier we treat this as a null scope. llvm-svn: 187812
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/DebugInfo.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/llvm/include/llvm/DebugInfo.h b/llvm/include/llvm/DebugInfo.h
index 9fb12f8feb0..f7e6434b4d7 100644
--- a/llvm/include/llvm/DebugInfo.h
+++ b/llvm/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.
OpenPOWER on IntegriCloud