projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
606c189
)
Fix cppcheck shadow variable warning. NFC.
author
Simon Pilgrim
<llvm-dev@redking.me.uk>
Mon, 18 Nov 2019 13:57:20 +0000
(13:57 +0000)
committer
Simon Pilgrim
<llvm-dev@redking.me.uk>
Mon, 18 Nov 2019 13:57:34 +0000
(13:57 +0000)
llvm/tools/llvm-objcopy/ELF/Object.cpp
patch
|
blob
|
history
diff --git
a/llvm/tools/llvm-objcopy/ELF/Object.cpp
b/llvm/tools/llvm-objcopy/ELF/Object.cpp
index dc2c7c8fa8b6c6c9709ac41e10381795b9cd90ba..a1073fe9dcb817a2095087c5918564c4c09ad179 100644
(file)
--- a/
llvm/tools/llvm-objcopy/ELF/Object.cpp
+++ b/
llvm/tools/llvm-objcopy/ELF/Object.cpp
@@
-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 *
First
Sec = Seg->firstSection();
+ if (Seg->Type == PT_PHDR || !
First
Sec)
continue;
- uint64_t Offset = Sec->Offset;
+ uint64_t Offset =
First
Sec->Offset;
uint64_t FileSize = 0;
for (const SectionBase *Sec : Seg->Sections) {
uint64_t Size = Sec->Type == SHT_NOBITS ? 0 : Sec->Size;