forked from OSchip/llvm-project
[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:
parent
36a8f7f6d8
commit
548553eac7
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue