1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

Fix cppcheck shadow variable warning. NFC.

This commit is contained in:
Simon Pilgrim 2019-11-18 13:57:20 +00:00
parent 4578f78374
commit 27ccb8f693

View File

@ -2003,11 +2003,11 @@ static uint64_t layoutSegmentsForOnlyKeepDebug(std::vector<Segment *> &Segments,
uint64_t HdrEnd) {
uint64_t MaxOffset = 0;
for (Segment *Seg : Segments) {
const SectionBase *Sec = Seg->firstSection();
if (Seg->Type == PT_PHDR || !Sec)
const SectionBase *FirstSec = Seg->firstSection();
if (Seg->Type == PT_PHDR || !FirstSec)
continue;
uint64_t Offset = Sec->Offset;
uint64_t Offset = FirstSec->Offset;
uint64_t FileSize = 0;
for (const SectionBase *Sec : Seg->Sections) {
uint64_t Size = Sec->Type == SHT_NOBITS ? 0 : Sec->Size;