[PATCH] D37601: Don't call exit from cl::PrintHelpMessage();

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 7 16:18:51 PDT 2017


ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: lib/Support/CommandLine.cpp:2104-2111
   if (!Hidden && !Categorized)
-    UncategorizedNormalPrinter = true;
+    UncategorizedNormalPrinter.printHelp();
   else if (!Hidden && Categorized)
-    CategorizedNormalPrinter = true;
+    CategorizedNormalPrinter.printHelp();
   else if (Hidden && !Categorized)
-    UncategorizedHiddenPrinter = true;
+    UncategorizedHiddenPrinter.printHelp();
   else
----------------
Thank you for doing this. This is much easier to understand than before. The previous code was too magical.


https://reviews.llvm.org/D37601





More information about the llvm-commits mailing list