mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[DWARFYAML] Make the length field of compilation units optional. NFC.
This patch makes the length field of compilation units optional (0 by default).
This commit is contained in:
parent
945d91b927
commit
41af990b28
@ -143,7 +143,7 @@ void MappingTraits<DWARFYAML::PubSection>::mapping(
|
||||
|
||||
void MappingTraits<DWARFYAML::Unit>::mapping(IO &IO, DWARFYAML::Unit &Unit) {
|
||||
IO.mapOptional("Format", Unit.Format, dwarf::DWARF32);
|
||||
IO.mapRequired("Length", Unit.Length);
|
||||
IO.mapOptional("Length", Unit.Length, 0);
|
||||
IO.mapRequired("Version", Unit.Version);
|
||||
if (Unit.Version >= 5)
|
||||
IO.mapRequired("UnitType", Unit.Type);
|
||||
|
@ -1368,8 +1368,7 @@ TEST(DWARFDebugInfo, TestEmptyChildren) {
|
||||
" Children: DW_CHILDREN_yes\n"
|
||||
" Attributes:\n"
|
||||
"debug_info:\n"
|
||||
" - Length: 0\n"
|
||||
" Version: 4\n"
|
||||
" - Version: 4\n"
|
||||
" AbbrOffset: 0\n"
|
||||
" AddrSize: 8\n"
|
||||
" Entries:\n"
|
||||
|
@ -34,8 +34,7 @@ TEST(DWARFDie, getLocations) {
|
||||
- Attribute: DW_AT_call_data_location
|
||||
Form: DW_FORM_sec_offset
|
||||
debug_info:
|
||||
- Length: 0
|
||||
Version: 5
|
||||
- Version: 5
|
||||
UnitType: DW_UT_compile
|
||||
AbbrOffset: 0
|
||||
AddrSize: 4
|
||||
|
Loading…
x
Reference in New Issue
Block a user