summaryrefslogtreecommitdiff
path: root/lib/IR/DebugInfo.cpp
diff options
context:
space:
mode:
authorManman Ren <manman.ren@gmail.com>2013-08-23 18:36:18 +0000
committerManman Ren <manman.ren@gmail.com>2013-08-23 18:36:18 +0000
commit003f5519129e5413768b3d6a309f36389f425ced (patch)
tree8b74d75871befde1ed7b581281fc22c1bb1c1cab /lib/IR/DebugInfo.cpp
parentb7f81d372a884453f821a3764028771c4896c3be (diff)
downloadllvm-003f5519129e5413768b3d6a309f36389f425ced.tar.gz
llvm-003f5519129e5413768b3d6a309f36389f425ced.tar.bz2
llvm-003f5519129e5413768b3d6a309f36389f425ced.tar.xz
DebugInfoFinder: handle template params of a DISubprogram.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189131 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/DebugInfo.cpp')
-rw-r--r--lib/IR/DebugInfo.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp
index cffc2ac1f2..de3360129a 100644
--- a/lib/IR/DebugInfo.cpp
+++ b/lib/IR/DebugInfo.cpp
@@ -1005,6 +1005,19 @@ void DebugInfoFinder::processSubprogram(DISubprogram SP) {
return;
processScope(SP.getContext());
processType(SP.getType());
+ DIArray TParams = SP.getTemplateParams();
+ for (unsigned I = 0, E = TParams.getNumElements(); I != E; ++I) {
+ DIDescriptor Element = TParams.getElement(I);
+ if (Element.isTemplateTypeParameter()) {
+ DITemplateTypeParameter TType(Element);
+ processScope(TType.getContext());
+ processType(TType.getType());
+ } else if (Element.isTemplateValueParameter()) {
+ DITemplateValueParameter TVal(Element);
+ processScope(TVal.getContext());
+ processType(TVal.getType());
+ }
+ }
}
/// processDeclare - Process DbgDeclareInst.