[Lldb-commits] [lldb] [lldb] Fix lookup of types in anonymous namespaces with -gsimple-template-names (PR #123054)

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Wed Jan 15 08:11:52 PST 2025


================
@@ -401,12 +399,28 @@ static CompilerContext GetContextEntry(DWARFDIE die) {
     return ctx(CompilerContextKind::Typedef);
   case DW_TAG_base_type:
     return ctx(CompilerContextKind::Builtin);
+  case DW_TAG_class_type:
+  case DW_TAG_structure_type:
+  case DW_TAG_union_type: {
+    CompilerContextKind kind = die.Tag() == DW_TAG_union_type
+                                   ? CompilerContextKind::Union
+                                   : CompilerContextKind::ClassOrStruct;
+    llvm::StringRef name = die.GetName();
+    if (!complete_template_names || name.contains('<'))
----------------
Michael137 wrote:

Ah right makes sense

> There's no CU-level attribute or anything that would convey that information

I think I asked about this a while back but would it be worth introducing such CU-level DWARF attribute?

https://github.com/llvm/llvm-project/pull/123054


More information about the lldb-commits mailing list