diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -2010,15 +2010,10 @@ for (unsigned i = 0, e = Args.Args.size(); i != e; ++i) { const TemplateArgument &TA = Args.Args[i]; StringRef Name; - bool defaultParameter = false; - if (Args.TList) { + bool defaultParameter = TA.getIsDefaulted(); + if (Args.TList) Name = Args.TList->getParam(i)->getName(); - NamedDecl const *ND = Args.TList->getParam(i); - defaultParameter = clang::isSubstitutedDefaultArgument( - CGM.getContext(), TA, ND, Args.Args, Args.TList->getDepth()); - } - switch (TA.getKind()) { case TemplateArgument::Type: { llvm::DIType *TTy = getOrCreateType(TA.getAsType(), Unit);