aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2022-07-14 18:50:02 +0000
committerDimitry Andric <dim@FreeBSD.org>2022-07-14 18:50:02 +0000
commit1f917f69ff07f09b6dbb670971f57f8efe718b84 (patch)
tree99293cbc1411737cd995dac10a99b2c40ef0944c /llvm/lib/Support/CommandLine.cpp
parent145449b1e420787bb99721a429341fa6be3adfb6 (diff)
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
-rw-r--r--llvm/lib/Support/CommandLine.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp
index eb6c04d987b3..e3df172ef113 100644
--- a/llvm/lib/Support/CommandLine.cpp
+++ b/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));