[PATCH] D61269: [CommandLine] Change help output to prefix long options with `--` instead of `-`. NFC . Part 3 of 5

Thomas Preud'homme via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 30 02:01:14 PDT 2019


thopre added inline comments.


================
Comment at: llvm/lib/Support/CommandLine.cpp:95
+
+static size_t argPrefixesSize(size_t len) {
+  if (len == 1)
----------------
Any reason why not take a StringRef of the option to compute the prefix of? That would put the .size() gymnastic in one place instead of many.


================
Comment at: llvm/lib/Support/CommandLine.cpp:101
+
+static StringRef argPrefix(size_t len) {
+  if (len == 1)
----------------
Likewise.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D61269





More information about the cfe-commits mailing list