aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2022-07-14 18:58:48 +0000
committerDimitry Andric <dim@FreeBSD.org>2023-04-09 14:54:46 +0000
commit7982d1ea2c5eb2ea2261fd82ebd7eebdda0e58b3 (patch)
treeab9cca65962565747080c60135e34ba569864a69 /contrib/llvm-project/llvm/lib/Support/CommandLine.cpp
parent255d6c9fe5a7577c6caf78004034f2555bd0cba0 (diff)
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Support/CommandLine.cpp')
-rw-r--r--contrib/llvm-project/llvm/lib/Support/CommandLine.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/llvm-project/llvm/lib/Support/CommandLine.cpp b/contrib/llvm-project/llvm/lib/Support/CommandLine.cpp
index eb6c04d987b3..e3df172ef113 100644
--- a/contrib/llvm-project/llvm/lib/Support/CommandLine.cpp
+++ b/contrib/llvm-project/llvm/lib/Support/CommandLine.cpp
@@ -1862,8 +1862,10 @@ void basic_parser_impl::printOptionInfo(const Option &O,
outs() << " <" << getValueStr(O, ValName) << ">...";
} else if (O.getValueExpectedFlag() == ValueOptional)
outs() << "[=<" << getValueStr(O, ValName) << ">]";
- else
- outs() << "=<" << getValueStr(O, ValName) << '>';
+ else {
+ outs() << (O.ArgStr.size() == 1 ? " <" : "=<") << getValueStr(O, ValName)
+ << '>';
+ }
}
Option::printHelpStr(O.HelpStr, GlobalWidth, getOptionWidth(O));