[DWARF] Fix undefined behaviour in dwarf type printer
authorMaurice Heumann <maurice.heumann@wibu.com>
Fri, 14 Jul 2023 18:56:58 +0000 (11:56 -0700)
committerEli Friedman <efriedma@quicinc.com>
Fri, 14 Jul 2023 19:54:18 +0000 (12:54 -0700)
commitd3c304fd637f1e1d9e311066a299839ace1c9344
tree5bf1ebb1573294e44795bd9c2322bd9448b318ee
parent0af663f80da0009f6fd879cf4d41743d4c88a2db
[DWARF] Fix undefined behaviour in dwarf type printer

The value to be formatted here, Val, is an int64_t which cannot be
formatted using %x. This commit adjusts all misuses I was able to find
in the llvm-dwarfdump project.

Failing tests in https://reviews.llvm.org/D153800 lead to the discovery
and analysis of this issue.

Differential Revision: https://reviews.llvm.org/D155093
llvm/lib/DebugInfo/DWARF/DWARFTypePrinter.cpp