summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2014-04-17 01:04:01 +0000
committerAdrian Prantl <aprantl@apple.com>2014-04-17 01:04:01 +0000
commit649f030819951ebd4e1c28bf479134e966ebe5e3 (patch)
treef22e4ce41b3c252d7e4646e5691fda3b9ce393d0 /clang/lib
parent287f989dde900b6f3b36328980242e040e6a7582 (diff)
downloadbcm5719-llvm-649f030819951ebd4e1c28bf479134e966ebe5e3.tar.gz
bcm5719-llvm-649f030819951ebd4e1c28bf479134e966ebe5e3.zip
Further simplify r206430.
rdar://problem/16636569. llvm-svn: 206434
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index dc49e1865ed..132c8418902 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -1356,19 +1356,10 @@ CollectFunctionTemplateParams(const FunctionDecl *FD, llvm::DIFile Unit) {
llvm::DIArray CGDebugInfo::
CollectCXXTemplateParams(const ClassTemplateSpecializationDecl *TSpecial,
llvm::DIFile Unit) {
- llvm::PointerUnion<ClassTemplateDecl *,
- ClassTemplatePartialSpecializationDecl *>
- PU = TSpecial->getSpecializedTemplateOrPartial();
-
- TemplateParameterList *TPList;
- if (auto *CTD = PU.dyn_cast<ClassTemplateDecl *>())
- TPList = CTD->getTemplateParameters();
- else {
- // Always get the full list of parameters, not just the ones from
- // the specialization.
- auto *CTPSD = PU.get<ClassTemplatePartialSpecializationDecl *>();
- TPList = CTPSD->getSpecializedTemplate()->getTemplateParameters();
- }
+ // Always get the full list of parameters, not just the ones from
+ // the specialization.
+ TemplateParameterList *TPList =
+ TSpecial->getSpecializedTemplate()->getTemplateParameters();
const TemplateArgumentList &TAList = TSpecial->getTemplateArgs();
return CollectTemplateParams(TPList, TAList.asArray(), Unit);
}
OpenPOWER on IntegriCloud