aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-02-02 22:36:18 +0000
committerDevang Patel <dpatel@apple.com>2011-02-02 22:36:18 +0000
commit0ce34c6ba0aa79708a62179c0fdf96891b62b5dc (patch)
tree03849a11fcd87efdeab7fef55369b35dd00c3e49 /lib/CodeGen/CGDebugInfo.cpp
parentaa596e877062ddd45d65705622a58587c5ba54b6 (diff)
Emit debug info for template value parameters.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124756 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index c4a6d570f2..7a67192379 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -967,6 +967,13 @@ llvm::DIType CGDebugInfo::CreateType(const RecordType *Ty) {
llvm::DITemplateTypeParameter TTP =
DBuilder.CreateTemplateTypeParameter(TheCU, TTy.getName(), TTy);
TemplateParams.push_back(TTP);
+ } else if (TA.getKind() == TemplateArgument::Integral) {
+ llvm::DIType TTy = getOrCreateType(TA.getIntegralType(), Unit);
+ // FIXME: Get parameter name, instead of parameter type name.
+ llvm::DITemplateValueParameter TVP =
+ DBuilder.CreateTemplateValueParameter(TheCU, TTy.getName(), TTy,
+ TA.getAsIntegral()->getZExtValue());
+ TemplateParams.push_back(TVP);
}
}
}