From: Adrian Prantl Date: Thu, 17 Apr 2014 01:04:01 +0000 (+0000) Subject: Further simplify r206430. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7cf5edcb1edbf38c52ea68fa63a45b365c0abbb0;p=clang Further simplify r206430. rdar://problem/16636569. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206434 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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 - PU = TSpecial->getSpecializedTemplateOrPartial(); - - TemplateParameterList *TPList; - if (auto *CTD = PU.dyn_cast()) - TPList = CTD->getTemplateParameters(); - else { - // Always get the full list of parameters, not just the ones from - // the specialization. - auto *CTPSD = PU.get(); - 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); }