[clang] 29ecf0e - [clang][DebugInfo] Check TemplateArgument::IsDefaulted
Michael Buch via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 26 18:35:15 PST 2023
Author: Michael Buch
Date: 2023-01-27T02:24:34Z
New Revision: 29ecf0e62cd7899dee84732a31875179ec4d5a80
URL: https://github.com/llvm/llvm-project/commit/29ecf0e62cd7899dee84732a31875179ec4d5a80
DIFF: https://github.com/llvm/llvm-project/commit/29ecf0e62cd7899dee84732a31875179ec4d5a80.diff
LOG: [clang][DebugInfo] Check TemplateArgument::IsDefaulted
Since `ClassTemplateSpecializationDecl`s now set the
`TemplateArgument::IsDefaulted` bit, there's no need
to derive it here.
Differential Revision: https://reviews.llvm.org/D142333
Added:
Modified:
clang/lib/CodeGen/CGDebugInfo.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 3bde43cc1db36..e05c157858128 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -2010,15 +2010,10 @@ CGDebugInfo::CollectTemplateParams(std::optional<TemplateArgs> OArgs,
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) {
+ const 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);
More information about the cfe-commits
mailing list