1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00

[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 e4d1228ccd
commit b22a094351

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) {