[PATCH] D102021: [NFC] Correctly assert the indents for printEnumValHelpStr.

Joachim Meyer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 7 05:28:12 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rGd9f2960c932c: [NFC] Correctly assert the indents for printEnumValHelpStr. (authored by fodinabor).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102021/new/

https://reviews.llvm.org/D102021

Files:
  llvm/lib/Support/CommandLine.cpp


Index: llvm/lib/Support/CommandLine.cpp
===================================================================
--- llvm/lib/Support/CommandLine.cpp
+++ llvm/lib/Support/CommandLine.cpp
@@ -1739,7 +1739,7 @@
 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";


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102021.343654.patch
Type: text/x-patch
Size: 676 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210507/acfc138b/attachment.bin>


More information about the llvm-commits mailing list