diff options
author | Adrian Prantl <aprantl@apple.com> | 2014-04-17 01:04:01 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2014-04-17 01:04:01 +0000 |
commit | 7cf5edcb1edbf38c52ea68fa63a45b365c0abbb0 (patch) | |
tree | dc9de7e071298d10360baebb593654ac272f7643 /lib/CodeGen/CGDebugInfo.cpp | |
parent | f05339023653484ae706c00594778674c95c6210 (diff) | |
download | clang-7cf5edcb1edbf38c52ea68fa63a45b365c0abbb0.tar.gz clang-7cf5edcb1edbf38c52ea68fa63a45b365c0abbb0.tar.bz2 clang-7cf5edcb1edbf38c52ea68fa63a45b365c0abbb0.tar.xz |
Further simplify r206430.
rdar://problem/16636569.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206434 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index dc49e1865e..132c841890 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/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); } |