================
@@ -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 "
----------------
Michael137 wrote:

I don't think we should be reporting this to the user console. Particularly, a 
user wouldn't really be aware of what a `Specialization for 
clang::ClassTemplateDecl` is and what the issue is with it already existing.

Lets just `LogConsole` here for now

https://github.com/llvm/llvm-project/pull/154123
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to