git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358809
91177308-0d34-0410-b5e6-
96231b3b80d8
// The end is the section end, the beginning of the next symbol, or
// --stop-address.
- uint64_t End = std::min<uint64_t>(
- SI + 1 < SE ? std::get<0>(Symbols[SI + 1]) : SectionAddr + SectSize,
- StopAddress);
+ uint64_t End = std::min<uint64_t>(SectionAddr + SectSize, StopAddress);
+ if (SI + 1 < SE)
+ End = std::min(End, std::get<0>(Symbols[SI + 1]));
if (Start >= End || End <= StartAddress)
continue;
Start -= SectionAddr;