forked from OSchip/llvm-project
Rangefy, and replace a switch with `if`s. NFC.
llvm-svn: 260320
This commit is contained in:
parent
260854bfaf
commit
d3bd97a97d
|
@ -943,21 +943,20 @@ uint8_t EHOutputSection<ELFT>::getFdeEncoding(ArrayRef<uint8_t> D) {
|
||||||
// We only care about an 'R' value, but other records may precede an 'R'
|
// We only care about an 'R' value, but other records may precede an 'R'
|
||||||
// record. Records are not in TLV (type-length-value) format, so we need
|
// record. Records are not in TLV (type-length-value) format, so we need
|
||||||
// to teach the linker how to skip records for each type.
|
// to teach the linker how to skip records for each type.
|
||||||
for (; !Aug.empty(); Aug = Aug.substr(1)) {
|
for (char C : Aug) {
|
||||||
switch (Aug[0]) {
|
if (C == 'R')
|
||||||
case 'z':
|
|
||||||
skipLeb128(D);
|
|
||||||
break;
|
|
||||||
case 'R':
|
|
||||||
return readByte(D);
|
return readByte(D);
|
||||||
case 'P':
|
if (C == 'z') {
|
||||||
skipAugP<ELFT>(D);
|
skipLeb128(D);
|
||||||
break;
|
continue;
|
||||||
case 'L':
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
fatal("unknown .eh_frame augmentation string: " + Aug);
|
|
||||||
}
|
}
|
||||||
|
if (C == 'P') {
|
||||||
|
skipAugP<ELFT>(D);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (C == 'L')
|
||||||
|
continue;
|
||||||
|
fatal("unknown .eh_frame augmentation string: " + Aug);
|
||||||
}
|
}
|
||||||
return DW_EH_PE_absptr;
|
return DW_EH_PE_absptr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue