Page MenuHomePhabricator

Sanitize llvm-size help
ClosedPublic

Authored by serge-sans-paille on May 27 2019, 5:15 AM.

Details

Summary

emove irrelevant options from standard help output.

New output:

OVERVIEW: llvm object size dumper

USAGE: llvm-size [options] <input files>

OPTIONS:

Generic Options:

  --help           - Display available options (--help-hidden for more)
  --help-list      - Display list of available options (--help-list-hidden for more)
  --version        - Display the version of this program

llvm-size Options:

  Specify output format
      -A             - System V format
      -B             - Berkeley format
      -m             - Darwin -m format
  --arch=<string>  - architecture(s) from a Mach-O file to dump
  --common         - Print common symbols in the ELF file.  When using Berkely format, this is added to bss.
  Print size in radix:
      -o             - Print size in octal
      -d             - Print size in decimal
      -x             - Print size in hexadecimal
  --format=<value> - Specify output format
    =sysv          -   System V format
    =berkeley      -   Berkeley format
    =darwin        -   Darwin -m format
  -l               - When format is darwin, use long format to include addresses and offsets.
  --radix=<value>  - Print size in radix
    =8             -   Print size in octal
    =10            -   Print size in decimal
    =16            -   Print size in hexadecimal
  --totals         - Print totals of all objects - Berkeley format only

Diff Detail

Repository
rL LLVM

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptMay 27 2019, 5:15 AM

For reference, unfiltered output:

OVERVIEW: llvm object size dumper

USAGE: llvm-size [options] <input files>

OPTIONS:

Color Options:

  --color                            - Use colors in output (default=autodetect)

General options:

  --remarks-yaml-string-table        - 
  --safepoint-ir-verifier-print-only - 
  --time-trace-granularity=<uint>    - Minimum time granularity (in microseconds) traced by time profiler

Generic Options:

  --help                             - Display available options (--help-hidden for more)
  --help-list                        - Display list of available options (--help-list-hidden for more)
  --version                          - Display the version of this program

llvm-size Options:

  Specify output format
      -A                               - System V format
      -B                               - Berkeley format
      -m                               - Darwin -m format
  --arch=<string>                    - architecture(s) from a Mach-O file to dump
  --common                           - Print common symbols in the ELF file.  When using Berkely format, this is added to bss.
  Print size in radix:
      -o                               - Print size in octal
      -d                               - Print size in decimal
      -x                               - Print size in hexadecimal
  --format=<value>                   - Specify output format
    =sysv                            -   System V format
    =berkeley                        -   Berkeley format
    =darwin                          -   Darwin -m format
  -l                                 - When format is darwin, use long format to include addresses and offsets.
  --radix=<value>                    - Print size in radix
    =8                               -   Print size in octal
    =10                              -   Print size in decimal
    =16                              -   Print size in hexadecimal
  --totals                           - Print totals of all objects - Berkeley format only

And i've analyzed the callgraph, none of the filtered option seems relevant.

Mostly looks good, but one small comment.

llvm/tools/llvm-size/llvm-size.cpp
99–101 ↗(On Diff #201506)

Is the option category needed on positional arguments? That surprises me slightly, since it doesn't directly appear in the help text.

  • do not set category for positional argument
This revision is now accepted and ready to land.Jun 5 2019, 3:17 AM
Closed by commit rL362593: Sanitize llvm-size help (authored by serge_sans_paille, committed by ). · Explain WhyJun 5 2019, 3:29 AM
This revision was automatically updated to reflect the committed changes.