diff options
author | Joachim Meyer <joachim@joameyer.de> | 2021-05-06 22:26:19 +0200 |
---|---|---|
committer | Joachim Meyer <joachim@joameyer.de> | 2021-05-07 14:30:43 +0200 |
commit | d9f2960c932c9803e662098e33d899efa3c67f44 (patch) | |
tree | 7e28a2ee99bcb3bb804e7e97f6e8fbb8d4bbb6fa /llvm/lib/Support/CommandLine.cpp | |
parent | ce0c1f3ced9bccb29c34b87de82c5cdffcbcd457 (diff) | |
download | llvm-d9f2960c932c9803e662098e33d899efa3c67f44.zip llvm-d9f2960c932c9803e662098e33d899efa3c67f44.tar.gz llvm-d9f2960c932c9803e662098e33d899efa3c67f44.tar.bz2 |
[NFC] Correctly assert the indents for printEnumValHelpStr.
Only verify that there's no negative indent.
Noted by @chapuni in https://reviews.llvm.org/D93494.
Reviewed By: chapuni
Differential Revision: https://reviews.llvm.org/D102021
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
-rw-r--r-- | llvm/lib/Support/CommandLine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp index cdd8ec2..0cc8273 100644 --- a/llvm/lib/Support/CommandLine.cpp +++ b/llvm/lib/Support/CommandLine.cpp @@ -1739,7 +1739,7 @@ void Option::printHelpStr(StringRef HelpStr, size_t Indent, void Option::printEnumValHelpStr(StringRef HelpStr, size_t BaseIndent, size_t FirstLineIndentedBy) { const StringRef ValHelpPrefix = " "; - assert(BaseIndent >= FirstLineIndentedBy + ValHelpPrefix.size()); + assert(BaseIndent >= FirstLineIndentedBy); std::pair<StringRef, StringRef> Split = HelpStr.split('\n'); outs().indent(BaseIndent - FirstLineIndentedBy) << ArgHelpPrefix << ValHelpPrefix << Split.first << "\n"; |