[DWARF] Simplify DWARFExpression. NFC.

As DataExtractor already has a method to extract an unsigned value of
a specified size, there is no need to duplicate that.

Differential Revision: https://reviews.llvm.org/D73263
This commit is contained in:
Igor Kudrin 2020-01-23 18:13:30 +07:00
parent 36a8f7f6d8
commit 548553eac7
1 changed files with 1 additions and 8 deletions

View File

@ -157,14 +157,7 @@ bool DWARFExpression::Operation::extract(DataExtractor Data, uint16_t Version,
Operands[Operand] = Data.getU64(&Offset);
break;
case Operation::SizeAddr:
if (AddressSize == 8) {
Operands[Operand] = Data.getU64(&Offset);
} else if (AddressSize == 4) {
Operands[Operand] = Data.getU32(&Offset);
} else {
assert(AddressSize == 2);
Operands[Operand] = Data.getU16(&Offset);
}
Operands[Operand] = Data.getUnsigned(&Offset, AddressSize);
break;
case Operation::SizeRefAddr:
if (getRefAddrSize(AddressSize, Version) == 8) {