[PATCH] D25463: [Support][CommandLine] Display subcommands in help when there are less than 3 subcommands
Alex Lorenz via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 12 03:23:59 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL283998: [Support][CommandLine] Display subcommands in help when there are less than 3 (authored by arphaman).
Changed prior to commit:
https://reviews.llvm.org/D25463?vs=74209&id=74354#toc
Repository:
rL LLVM
https://reviews.llvm.org/D25463
Files:
llvm/trunk/lib/Support/CommandLine.cpp
Index: llvm/trunk/lib/Support/CommandLine.cpp
===================================================================
--- llvm/trunk/lib/Support/CommandLine.cpp
+++ llvm/trunk/lib/Support/CommandLine.cpp
@@ -1780,7 +1780,7 @@
if (ConsumeAfterOpt)
outs() << " " << ConsumeAfterOpt->HelpStr;
- if (Sub == &*TopLevelSubCommand && Subs.size() > 2) {
+ if (Sub == &*TopLevelSubCommand && !Subs.empty()) {
// Compute the maximum subcommand length...
size_t MaxSubLen = 0;
for (size_t i = 0, e = Subs.size(); i != e; ++i)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25463.74354.patch
Type: text/x-patch
Size: 552 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161012/b170a1b7/attachment.bin>
More information about the llvm-commits
mailing list