Debug Info Finder|Verifier: handle DbgLoc attached to instructions.
authorManman Ren <manman.ren@gmail.com>
Thu, 1 Aug 2013 20:52:39 +0000 (20:52 +0000)
committerManman Ren <manman.ren@gmail.com>
Thu, 1 Aug 2013 20:52:39 +0000 (20:52 +0000)
commitf589eef8645219dbcd1a4eec85ffb34a067534a6
tree578ff6ab4a2d6c71ab726a6c6c1482ad72dd90ed
parentc8b93557da150e051c273701652a2db328708708
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
17 files changed:
include/llvm/DebugInfo.h
lib/IR/DebugInfo.cpp
lib/IR/Verifier.cpp
test/BugPoint/metadata.ll
test/CodeGen/ARM/2010-04-15-ScavengerDebugValue.ll
test/CodeGen/X86/2009-02-12-DebugInfoVLA.ll
test/CodeGen/X86/2010-01-18-DbgValue.ll
test/CodeGen/X86/2010-06-01-DeadArg-DbgInfo.ll
test/DebugInfo/2010-01-05-DbgScope.ll
test/DebugInfo/2010-05-03-DisableFramePtr.ll
test/DebugInfo/2010-05-10-MultipleCU.ll
test/DebugInfo/X86/2010-04-13-PubType.ll
test/Feature/md_on_instruction.ll
test/Transforms/DeadArgElim/2010-04-30-DbgInfo.ll
test/Transforms/GlobalOpt/2009-03-05-dbg.ll
test/Transforms/Mem2Reg/ConvertDebugInfo.ll
test/Transforms/StripSymbols/2010-07-01-DeadDbgInfo.ll