Cleanup else-after-return and add an early-return to llvm-nm
authorDavid Blaikie <dblaikie@gmail.com>
Mon, 23 Mar 2015 21:17:43 +0000 (21:17 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Mon, 23 Mar 2015 21:17:43 +0000 (21:17 +0000)
commitdce96380c111c68efe50baa7a4d26bc0925dd9a6
treeae80f2f86e2964b9b15567e4cdd2f06c388b615a
parentc9ad3ab62466cbfb774e40260161015f4fbaecae
Cleanup else-after-return and add an early-return to llvm-nm

The loop and error handling in checkMachOAndArchFlags didn't make sense
to me (a loop that only ever executes once? An error path that uses the
element the loop stopped at (which must always be a buffer overrun if
I'm reading that right?)... I'm confused) but I've made a guess at what
was intended.

Based on a patch by Richard Thomson to simplify boolean expressions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233025 91177308-0d34-0410-b5e6-96231b3b80d8
tools/llvm-nm/llvm-nm.cpp