[DebugInfo][DWARF] Add doesFormBelongToClass function.
authorAlexey Lapshin <a.v.lapshin@mail.ru>
Tue, 7 Mar 2023 12:46:21 +0000 (13:46 +0100)
committerAlexey Lapshin <a.v.lapshin@mail.ru>
Thu, 9 Mar 2023 17:21:37 +0000 (18:21 +0100)
commit936954631b57a3dd18dec62c847a8d6305b37385
treeb9e9e56588fa28971a32a1f71118f5224c6019af
parent061023e45062292cc700dbd83ebcd9b720a2a220
[DebugInfo][DWARF] Add doesFormBelongToClass function.

The result of DWARFFormValue::isFormClass depends on DWARF version in some cases.
The current implementation takes DWARF version from the stored DWARFUnit.
If there is no stored DWARFUnit then the current behavior is to assume
DwarfVersion <= 3. This patch adds new function which has a DWARF version as a
parameter so it is possible to check form class for various DWARF versions.

Differential Revision: https://reviews.llvm.org/D145499
llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h
llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp
llvm/unittests/DebugInfo/DWARF/DWARFFormValueTest.cpp