[lldb] Fix -Waggressive-loop-optimizations warning
authorVedant Kumar <vsk@apple.com>
Mon, 7 Nov 2016 02:39:37 +0000 (02:39 +0000)
committerVedant Kumar <vsk@apple.com>
Mon, 7 Nov 2016 02:39:37 +0000 (02:39 +0000)
commit6ba1db9f787a373677cb9c08c0e7b7ad305604d5
treea6d31cb22bf80f5393fb2e8a6475152c506fec81
parentb110e0485194d1b5ba4c3cb02a8cd2ee57be92cd
[lldb] Fix -Waggressive-loop-optimizations warning

We shouldn't access past the end of an array, even if we think that the
layout of the struct containing the array is always what we expect. The
compiler is free to optimize away the stores as undefined behavior, and
in fact, GCC 6.2.1 claims it will do exactly this.

llvm-svn: 286093
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp