MachO: stop iterating past the end of an array
authorTim Northover <tnorthover@apple.com>
Mon, 30 Jun 2014 10:30:00 +0000 (10:30 +0000)
committerTim Northover <tnorthover@apple.com>
Mon, 30 Jun 2014 10:30:00 +0000 (10:30 +0000)
commitb5bf686b58a8692726e4017c734f0c6d065e5ac5
treebc4fb3282e6882327513de77c527ae8accbe6e7b
parent18eb25e85b31374debe59a7036f97d2cd7614a62
MachO: stop iterating past the end of an array

When trying to map atom types to sections, we were iterating through an array
until we hit a sentinel value. There's no need for such dances when range-based
for loops are available.

llvm-svn: 212035
lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
lld/test/mach-o/write-final-sections.yaml