[all-commits] [llvm/llvm-project] 47db32: [llvm-size] Switch command line parsing from llvm:...

Fangrui Song via All-commits all-commits at lists.llvm.org
Fri Jul 9 10:27:08 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 47db32e542eb84ca9d4bed798bbdfd40200ac1ef
      https://github.com/llvm/llvm-project/commit/47db32e542eb84ca9d4bed798bbdfd40200ac1ef
  Author: Fangrui Song <i at maskray.me>
  Date:   2021-07-09 (Fri, 09 Jul 2021)

  Changed paths:
    M llvm/docs/CommandGuide/llvm-size.rst
    M llvm/test/tools/llvm-size/help.test
    M llvm/test/tools/llvm-size/radix.test
    M llvm/test/tools/llvm-size/unknown-format.test
    M llvm/tools/llvm-size/CMakeLists.txt
    A llvm/tools/llvm-size/Opts.td
    M llvm/tools/llvm-size/llvm-size.cpp
    M llvm/utils/gn/secondary/llvm/tools/llvm-size/BUILD.gn
    M utils/bazel/llvm-project-overlay/llvm/BUILD.bazel

  Log Message:
  -----------
  [llvm-size] Switch command line parsing from llvm::cl to OptTable

Part of https://lists.llvm.org/pipermail/llvm-dev/2021-July/151622.html
"Binary utilities: switch command line parsing from llvm::cl to OptTable"

* `--totals=false` and `--totals=0` cannot be used. Omit the option.
* `--help-list` is removed. This is a `cl::` specific option.

OptTable avoids global option collision if we decide to support multiplexing for binary utilities.

Note: because the tool is simple, and its long options are uncommon, I just drop
the one-dash forms except `-arch <value>` (Darwin style).

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D105598




More information about the All-commits mailing list