[lldb][NFC] Refactor printing of short options in help
authorDavid Spickett <david.spickett@linaro.org>
Mon, 11 Apr 2022 12:55:55 +0000 (12:55 +0000)
committerDavid Spickett <david.spickett@linaro.org>
Tue, 3 May 2022 15:18:39 +0000 (15:18 +0000)
commitcf05de7168b0ae2eaffdd6ab5a7c982bfa6da5c6
tree3d2e707e6ce1ddb9bc0b34c7a1a21b36ee14cd24
parent625e0e611b405b9c45b6d8a692d7ef17ef04e54f
[lldb][NFC] Refactor printing of short options in help

Instead of building a set twice for optional and required,
build a set for each while walking the options once.

Then take advantage of set being sorted meaning we don't
have to enforce the upper/lower order ourselves.

Just cleaned up the formatting on the later loops.
Combined the if conditions and used a single line if.

Depends on D123501

Reviewed By: jingham

Differential Revision: https://reviews.llvm.org/D123502
lldb/source/Interpreter/Options.cpp