1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

[DWARF] Eliminate the DWARFDebugNames::Header::Padding field.

The padding field is reserved for DWARF and does not contain any useful
information. No need to read, store and report it.

Differential Revision: https://reviews.llvm.org/D73042
This commit is contained in:
Igor Kudrin 2020-01-20 16:44:00 +07:00
parent 42f3dd2bd4
commit 6f7dc261ee
3 changed files with 2 additions and 5 deletions

View File

@ -231,7 +231,6 @@ public:
struct Header {
uint32_t UnitLength;
uint16_t Version;
uint16_t Padding;
uint32_t CompUnitCount;
uint32_t LocalTypeUnitCount;
uint32_t ForeignTypeUnitCount;

View File

@ -366,7 +366,6 @@ void DWARFDebugNames::Header::dump(ScopedPrinter &W) const {
DictScope HeaderScope(W, "Header");
W.printHex("Length", UnitLength);
W.printNumber("Version", Version);
W.printHex("Padding", Padding);
W.printNumber("CU count", CompUnitCount);
W.printNumber("Local TU count", LocalTypeUnitCount);
W.printNumber("Foreign TU count", ForeignTypeUnitCount);
@ -397,7 +396,8 @@ Error DWARFDebugNames::Header::extract(const DWARFDataExtractor &AS,
UnitLength = AS.getU32(Offset);
Version = AS.getU16(Offset);
Padding = AS.getU16(Offset);
// Skip padding
*Offset += 2;
CompUnitCount = AS.getU32(Offset);
LocalTypeUnitCount = AS.getU32(Offset);
ForeignTypeUnitCount = AS.getU32(Offset);

View File

@ -98,7 +98,6 @@
# CHECK-NEXT: Header {
# CHECK-NEXT: Length: 0x60
# CHECK-NEXT: Version: 5
# CHECK-NEXT: Padding: 0x0
# CHECK-NEXT: CU count: 1
# CHECK-NEXT: Local TU count: 0
# CHECK-NEXT: Foreign TU count: 0
@ -144,7 +143,6 @@
# CHECK-NEXT: Header {
# CHECK-NEXT: Length: 0x44
# CHECK-NEXT: Version: 5
# CHECK-NEXT: Padding: 0x0
# CHECK-NEXT: CU count: 1
# CHECK-NEXT: Local TU count: 0
# CHECK-NEXT: Foreign TU count: 0