ARMAttributeParser - fix shadow variable name warnings from decodeULEB128 calls. NFCI.

Consistently rename the Length attribute to DecodeLength in decodeULEB128 calls.
This commit is contained in:
Simon Pilgrim 2019-11-02 20:11:29 +00:00
parent 004eb2c862
commit c0e83fa5ac
1 changed files with 9 additions and 9 deletions

View File

@ -73,9 +73,9 @@ ARMAttributeParser::DisplayRoutines[] = {
uint64_t ARMAttributeParser::ParseInteger(const uint8_t *Data, uint64_t ARMAttributeParser::ParseInteger(const uint8_t *Data,
uint32_t &Offset) { uint32_t &Offset) {
unsigned Length; unsigned DecodeLength;
uint64_t Value = decodeULEB128(Data + Offset, &Length); uint64_t Value = decodeULEB128(Data + Offset, &DecodeLength);
Offset = Offset + Length; Offset += DecodeLength;
return Value; return Value;
} }
@ -587,9 +587,9 @@ void ARMAttributeParser::nodefaults(AttrType Tag, const uint8_t *Data,
void ARMAttributeParser::ParseIndexList(const uint8_t *Data, uint32_t &Offset, void ARMAttributeParser::ParseIndexList(const uint8_t *Data, uint32_t &Offset,
SmallVectorImpl<uint8_t> &IndexList) { SmallVectorImpl<uint8_t> &IndexList) {
for (;;) { for (;;) {
unsigned Length; unsigned DecodeLength;
uint64_t Value = decodeULEB128(Data + Offset, &Length); uint64_t Value = decodeULEB128(Data + Offset, &DecodeLength);
Offset = Offset + Length; Offset += DecodeLength;
if (Value == 0) if (Value == 0)
break; break;
IndexList.push_back(Value); IndexList.push_back(Value);
@ -599,9 +599,9 @@ void ARMAttributeParser::ParseIndexList(const uint8_t *Data, uint32_t &Offset,
void ARMAttributeParser::ParseAttributeList(const uint8_t *Data, void ARMAttributeParser::ParseAttributeList(const uint8_t *Data,
uint32_t &Offset, uint32_t Length) { uint32_t &Offset, uint32_t Length) {
while (Offset < Length) { while (Offset < Length) {
unsigned Length; unsigned DecodeLength;
uint64_t Tag = decodeULEB128(Data + Offset, &Length); uint64_t Tag = decodeULEB128(Data + Offset, &DecodeLength);
Offset += Length; Offset += DecodeLength;
bool Handled = false; bool Handled = false;
for (unsigned AHI = 0, AHE = array_lengthof(DisplayRoutines); for (unsigned AHI = 0, AHE = array_lengthof(DisplayRoutines);