DebugInfoFinder: handle template params of a DISubprogram.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189131 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Manman Ren 2013-08-23 18:36:18 +00:00
parent b7f81d372a
commit 003f551912

View File

@ -1005,6 +1005,19 @@ void DebugInfoFinder::processSubprogram(DISubprogram SP) {
return; return;
processScope(SP.getContext()); processScope(SP.getContext());
processType(SP.getType()); 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. /// processDeclare - Process DbgDeclareInst.