[Lldb-commits] [lldb] Reland "[LLDB][NativePDB] Create functions with mangled name" (PR #161678)

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 6 04:35:48 PDT 2025


================
@@ -501,7 +501,13 @@ lldb::FunctionSP SymbolFileNativePDB::CreateFunction(PdbCompilandSymId func_id,
     return nullptr;
 
   PdbTypeSymId sig_id(proc.FunctionType, false);
-  Mangled mangled(proc.Name);
+
+  std::optional<llvm::StringRef> mangled_opt =
+      FindMangledSymbol(SegmentOffset(proc.Segment, proc.CodeOffset));
+  if (mangled_opt)
+    mangled_opt = StripMangledFunctionName(*mangled_opt, proc.FunctionType);
----------------
Michael137 wrote:

Can construct in-place instead:
```suggestion
    mangled_opt.emplace(StripMangledFunctionName(*mangled_opt, proc.FunctionType));
```

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


More information about the lldb-commits mailing list