[Lldb-commits] [lldb] [LLDB][NativePDB] Allow type lookup in namespaces (PR #149876)

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 4 00:55:51 PDT 2025


================
@@ -816,10 +816,12 @@ Type::GetTypeScopeAndBasename(llvm::StringRef name) {
     case ':':
       if (prev_is_colon && template_depth == 0) {
         llvm::StringRef scope_name = name.slice(name_begin, pos.index() - 1);
-        // The itanium demangler uses this string to represent anonymous
+        // The demanglers use these strings to represent anonymous
         // namespaces. Convert it to a more language-agnostic form (which is
         // also used in DWARF).
-        if (scope_name == "(anonymous namespace)")
+        if (scope_name == "(anonymous namespace)" ||
+            scope_name == "`anonymous namespace'" ||
+            scope_name == "`anonymous-namespace'")
----------------
Michael137 wrote:

if this is how the MS demangler presents anonymous namespaces there's probably some other places where hardcode this that might need patching up. But that's outside the scope of this PR

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


More information about the lldb-commits mailing list