[all-commits] [llvm/llvm-project] 382e3f: [lldb][Formatter] Get element type for unordered_m...

Michael Buch via All-commits all-commits at lists.llvm.org
Tue Jun 17 09:37:48 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 382e3fdbb476a5d5771b315daedcd05a15883fbc
      https://github.com/llvm/llvm-project/commit/382e3fdbb476a5d5771b315daedcd05a15883fbc
  Author: Michael Buch <michaelbuch12 at gmail.com>
  Date:   2025-06-17 (Tue, 17 Jun 2025)

  Changed paths:
    M lldb/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp

  Log Message:
  -----------
  [lldb][Formatter] Get element type for unordered_maps from __hash_table::value_type (#144517)

https://github.com/llvm/llvm-project/pull/143501 changes usage of
`__hash_value_type` in libcxx to an empty tag type. This type will no
longer have a definition in DWARF. Currently the LLDB unordered_map
formatter deduces the map's `element_type` by looking at the `__cc_`
member of `__hash_value_type`. But that will no longer work because we
only have its forward declaration. Since what we're really after is the
type that `__hash_value_type` is wrapping, we can just look at the
`__hash_table::value_type` typedef. With
https://github.com/llvm/llvm-project/pull/143501 that will now point to
the `std::pair` element type (which used to be what we got from
`__cc_`).

TBD: need to double-check this works for older layouts. Quick glance at
the code makes me suspicious of cases like `unordered_map<std::pair<int,
int>, int>`



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list