[Lldb-commits] [lldb] [lldb][DWARFASTParserClang] Added a check for the specialization existence (PR #154123)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Sep 8 04:15:15 PDT 2025
================
@@ -1873,6 +1874,24 @@ DWARFASTParserClang::ParseStructureLikeDIE(const SymbolContext &sc,
clang_type =
m_ast.CreateClassTemplateSpecializationType(class_specialization_decl);
+ // Try to find an existing specialization with these template arguments and
+ // template parameter list.
+ void *InsertPos = nullptr;
+ llvm::ArrayRef<clang::TemplateArgument> args =
+ template_param_infos.GetArgs();
+ if (!args.empty() &&
+ !class_template_decl->findSpecialization(args, InsertPos))
+ // Add this specialization to the class template.
+ class_template_decl->AddSpecialization(class_specialization_decl,
+ InsertPos);
+ else {
+ module_sp->ReportError("SymbolFileDWARF({0:p}) - Specialization for "
----------------
tgs-sc wrote:
Addressed
https://github.com/llvm/llvm-project/pull/154123
More information about the lldb-commits
mailing list