Avoid fragile type lookups in GDB pretty printer
authorMoritz Sichert <sichert@in.tum.de>
Mon, 11 Jan 2021 14:55:20 +0000 (15:55 +0100)
committerMoritz Sichert <sichert@in.tum.de>
Fri, 22 Jan 2021 13:56:32 +0000 (14:56 +0100)
commitb46545542b3010749b530f37d24e24a6abdd58e9
treee7580284057b199d2535cd4202369cb639b89bde
parent2a8cbdd83006d638936800f9ed3dea4fc20ddf32
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
llvm/utils/gdb-scripts/prettyprinters.py