================ @@ -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('<')) ---------------- labath wrote:
You were probably asking @dwblaikie as I wasn't involved in the original implementation. Anyway, here's what I think. If we were able to simplify all template names, then I can see how such an attribute could be useful as a replacement for the `contains('<')` heuristic, though I believe that is just a performance optimization (avoid searching through children DIEs if we see the name is templated) and shouldn't produce false positives. It could also be used for things like "if all CUs are using the same kind of names then don't bother trying to search for the other name kind", though I'm unsure what difference would it make in practice (especially the search with the full name should be very fast as it will just get zero hits). As it stands now, I think it's usefulness would be very limited. About the only thing I can think of is skipping the query with the simplified name if all CUs report they are using full names. That may make sense if you're seeing slowdown due to the additional simplified-name queries. https://github.com/llvm/llvm-project/pull/123054 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits