[DebugInfo] Fix misleading using of DWARF forms with DIELabel. NFCI.
authorIgor Kudrin <ikudrin@accesssoftek.com>
Mon, 3 Aug 2020 08:04:08 +0000 (15:04 +0700)
committerIgor Kudrin <ikudrin@accesssoftek.com>
Mon, 3 Aug 2020 08:04:08 +0000 (15:04 +0700)
commitf98e03a35ded30893095f71be933ffc754d71d37
tree61821dee81ad52e47c514a0da5be94e100749782
parent8feff8d14f75aafe4af77a6295d59d28e7a72829
[DebugInfo] Fix misleading using of DWARF forms with DIELabel. NFCI.

DIELabel can emit only 32- or 64-bit values, while it was created in
some places with DW_FORM_udata, which implies emitting uleb128.
Nevertheless, these places also expected to emit U32 or U64, but just
used a misleading DWARF form. The patch updates those places to use more
appropriate DWARF forms and restricts DIELabel::SizeOf() to accept only
forms that are actually used in the LLVM codebase.

Differential Revision: https://reviews.llvm.org/D84094
llvm/lib/CodeGen/AsmPrinter/DIE.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp