WIP: Verify -gsimple-template-names=mangled values
authorDavid Blaikie <dblaikie@gmail.com>
Mon, 20 Sep 2021 04:04:03 +0000 (21:04 -0700)
committerDavid Blaikie <dblaikie@gmail.com>
Fri, 24 Sep 2021 21:28:18 +0000 (14:28 -0700)
commit9911af4b91c670477cf920f168b339bd2f3f307f
tree7a12dc8b3f2bd23f0485a5d0693ed23e3de3862e
parent62d6ff5e9e70dd11a4e9e6efc48ce174cd6849bd
WIP: Verify -gsimple-template-names=mangled values

Clang will encode names that should be able to be simplified as
"_STNname|<template, args>" (eg: "_STNt1|<int>") - this verification
mode will detect these names, decode them, create the original name
("t1<int>") and the simple name ("t1") - letting the simple name run
through the usual rebuilding logic - then compare the two sources of the
full name - the rebuilt and the _STN encoding.

This helps ensure that -gsimple-template-names is lossless.
llvm/include/llvm/DebugInfo/DWARF/DWARFDie.h
llvm/include/llvm/DebugInfo/DWARF/DWARFVerifier.h
llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
llvm/test/tools/llvm-dwarfdump/X86/prettyprint_types.s