Skip to content

Commit d9f2960

Browse files
committed
[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
1 parent ce0c1f3 commit d9f2960

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Support/CommandLine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1739,7 +1739,7 @@ void Option::printHelpStr(StringRef HelpStr, size_t Indent,
17391739
void Option::printEnumValHelpStr(StringRef HelpStr, size_t BaseIndent,
17401740
size_t FirstLineIndentedBy) {
17411741
const StringRef ValHelpPrefix = " ";
1742-
assert(BaseIndent >= FirstLineIndentedBy + ValHelpPrefix.size());
1742+
assert(BaseIndent >= FirstLineIndentedBy);
17431743
std::pair<StringRef, StringRef> Split = HelpStr.split('\n');
17441744
outs().indent(BaseIndent - FirstLineIndentedBy)
17451745
<< ArgHelpPrefix << ValHelpPrefix << Split.first << "\n";

0 commit comments

Comments
 (0)