Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit 003f551

Browse files
committed
DebugInfoFinder: handle template params of a DISubprogram.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189131 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent b7f81d3 commit 003f551

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lib/IR/DebugInfo.cpp

+13
Original file line numberDiff line numberDiff line change
@@ -1005,6 +1005,19 @@ void DebugInfoFinder::processSubprogram(DISubprogram SP) {
10051005
return;
10061006
processScope(SP.getContext());
10071007
processType(SP.getType());
1008+
DIArray TParams = SP.getTemplateParams();
1009+
for (unsigned I = 0, E = TParams.getNumElements(); I != E; ++I) {
1010+
DIDescriptor Element = TParams.getElement(I);
1011+
if (Element.isTemplateTypeParameter()) {
1012+
DITemplateTypeParameter TType(Element);
1013+
processScope(TType.getContext());
1014+
processType(TType.getType());
1015+
} else if (Element.isTemplateValueParameter()) {
1016+
DITemplateValueParameter TVal(Element);
1017+
processScope(TVal.getContext());
1018+
processType(TVal.getType());
1019+
}
1020+
}
10081021
}
10091022

10101023
/// processDeclare - Process DbgDeclareInst.

0 commit comments

Comments
 (0)