summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR
diff options
context:
space:
mode:
authorManman Ren <manman.ren@gmail.com>2013-07-23 23:10:00 +0000
committerManman Ren <manman.ren@gmail.com>2013-07-23 23:10:00 +0000
commit8f1a3cf4c30cd5bfb459b2175b6dc7c6fb11400f (patch)
treee0d06758d67c046d904c61fcbe9e689c146a9026 /llvm/lib/IR
parentf562d11a6d4cd43b29e28f9632cb9af6f1fece5b (diff)
downloadbcm5719-llvm-8f1a3cf4c30cd5bfb459b2175b6dc7c6fb11400f.tar.gz
bcm5719-llvm-8f1a3cf4c30cd5bfb459b2175b6dc7c6fb11400f.zip
Debug Info: improve the Finder.
Improve the Finder to handle context of a DIVariable. If Scope is a DICompileUnit, add it to the list of CUs. llvm-svn: 187003
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r--llvm/lib/IR/DebugInfo.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index 0fbfd2da86c..b611f458c0e 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -908,6 +908,14 @@ void DebugInfoFinder::processScope(DIScope Scope) {
processType(Ty);
return;
}
+ if (Scope.isCompileUnit()) {
+ addCompileUnit(DICompileUnit(Scope));
+ return;
+ }
+ if (Scope.isSubprogram()) {
+ processSubprogram(DISubprogram(Scope));
+ return;
+ }
if (!addScope(Scope))
return;
if (Scope.isLexicalBlock()) {
@@ -954,6 +962,7 @@ void DebugInfoFinder::processDeclare(const DbgDeclareInst *DDI) {
if (!NodesSeen.insert(DV))
return;
+ processScope(DIVariable(N).getContext());
processType(DIVariable(N).getType());
}
OpenPOWER on IntegriCloud