[Lldb-commits] [lldb] [lldb] Delay creation of ConstStrings when parsing MachO symtab (PR #155931)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 29 09:19:19 PDT 2025


https://github.com/JDevlieghere approved this pull request.

ConstStrings are fast when comparing existing ones. But creating them is expensive because the string pool is global. Here we're parsing strings, so we always have to do a create + lookup. By using a StringMap, we can do a cheaper (non global lookup) and only do the more expensive creation after we've eliminated the duplicates.

LGTM!

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


More information about the lldb-commits mailing list