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

Don Hinton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 30 02:30:27 PDT 2019


hintonda marked an inline comment as done.
hintonda added inline comments.


================
Comment at: llvm/lib/Support/CommandLine.cpp:95
+
+static size_t argPrefixesSize(size_t len) {
+  if (len == 1)
----------------
thopre wrote:
> 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.
Actually, that's what I originally had, but since it was only a few places, I changed it to take the length.  Now that I see it's used all over, I'll probably switch it back as you suggest.


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