diff options
author | Manman Ren <manman.ren@gmail.com> | 2013-08-23 18:36:18 +0000 |
---|---|---|
committer | Manman Ren <manman.ren@gmail.com> | 2013-08-23 18:36:18 +0000 |
commit | 003f5519129e5413768b3d6a309f36389f425ced (patch) | |
tree | 8b74d75871befde1ed7b581281fc22c1bb1c1cab /lib/IR/DebugInfo.cpp | |
parent | b7f81d372a884453f821a3764028771c4896c3be (diff) | |
download | external_llvm-003f5519129e5413768b3d6a309f36389f425ced.zip external_llvm-003f5519129e5413768b3d6a309f36389f425ced.tar.gz external_llvm-003f5519129e5413768b3d6a309f36389f425ced.tar.bz2 |
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.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp index cffc2ac..de33601 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. |