[all-commits] [llvm/llvm-project] b46545: Avoid fragile type lookups in GDB pretty printer

Moritz Sichert via All-commits all-commits at lists.llvm.org
Fri Jan 22 06:02:05 PST 2021


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b46545542b3010749b530f37d24e24a6abdd58e9
      https://github.com/llvm/llvm-project/commit/b46545542b3010749b530f37d24e24a6abdd58e9
  Author: Moritz Sichert <sichert at in.tum.de>
  Date:   2021-01-22 (Fri, 22 Jan 2021)

  Changed paths:
    M llvm/utils/gdb-scripts/prettyprinters.py

  Log Message:
  -----------
  Avoid fragile type lookups in GDB pretty printer

Instead of using the type llvm::StringMapEntry<{stringified_value_type}>
use only the base class llvm::StringMapEntryBase and calculate the
offsets of the member variables manually. The approach with stringifying
the name of the value type is pretty fragile as it can easily break with
local and dependent types.

Differential Revision: https://reviews.llvm.org/D94431




More information about the All-commits mailing list