[PATCH] D48577: [llvm-ar] Correct help text

ben via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 25 18:27:04 PDT 2018


bd1976llvm created this revision.
bd1976llvm added reviewers: majnemer, MaskRay, maskray0, ruiu, aganea, pcc, dmikulin.

I have corrected the help text but avoided completely rewriting it.

- I took the description from https://llvm.org/docs/CommandGuide/llvm-ar.html.
- I removed references to missing modifiers (also removed the "count" positional argument only used by removed "N" modifier).
- Used "archive" rather than "library" - more correct (library is a subset of archive).
- Used "files" rather than "members" - for consistency with the rest of the help text.
- "s" is both an operation key letter and a modifier.


Repository:
  rL LLVM

https://reviews.llvm.org/D48577

Files:
  tools/llvm-ar/llvm-ar.cpp


Index: tools/llvm-ar/llvm-ar.cpp
===================================================================
--- tools/llvm-ar/llvm-ar.cpp
+++ tools/llvm-ar/llvm-ar.cpp
@@ -65,44 +65,46 @@
 const char ArHelp[] = R"(
 OVERVIEW: LLVM Archiver (llvm-ar)
 
-  This program archives bitcode files into single libraries
+  This program is similar to the common Unix utility, ar. 
+  It archives several files together into a single file.
 
-USAGE: llvm-ar [options] [relpos] [count] <archive-file> [members]...
+USAGE: llvm-ar [options] <operation>[modifiers...] [relpos] <archive-file> [files...]
+       llvm-ar -M [<mri-script]
 
 OPTIONS:
-  -M                                -
   -format                           - Archive format to create
     =default                        -   default
     =gnu                            -   gnu
     =darwin                         -   darwin
     =bsd                            -   bsd
-  -plugin=<string>                  - plugin (ignored for compatibility
+  -plugin=<string>                  - Plugin (ignored for compatibility)
   -help                             - Display available options
   -version                          - Display the version of this program
 
 OPERATIONS:
-  d[NsS]       - delete file(s) from the archive
-  m[abiSs]     - move file(s) in the archive
-  p[kN]        - print file(s) found in the archive
-  q[ufsS]      - quick append file(s) to the archive
-  r[abfiuRsS]  - replace or insert file(s) into the archive
+  d            - delete file(s) from the archive
+  m[abi]       - move file(s) in the archive
+  p            - print file(s) found in the archive
+  q            - quick append file(s) to the archive
+  r[abiu]      - replace or insert file(s) into the archive
+  s            - act as ranlib
   t            - display contents of archive
-  x[No]        - extract file(s) from the archive
+  x[o]         - extract file(s) from the archive
 
 MODIFIERS (operation specific):
   [a] - put file(s) after [relpos]
   [b] - put file(s) before [relpos] (same as [i])
   [D] - use zero for timestamps and uids/gids (default)
   [i] - put file(s) before [relpos] (same as [b])
   [o] - preserve original dates
-  [s] - create an archive index (cf. ranlib)
-  [S] - do not build a symbol table
   [T] - create a thin archive
   [u] - update only files newer than archive contents
   [U] - use actual timestamps and uids/gids
 
 MODIFIERS (generic):
-  [c] - do not warn if the library had to be created
+  [c] - do not warn if the archive had to be created
+  [s] - create an archive index (cf. ranlib)
+  [S] - do not build a symbol table
   [v] - be verbose about actions taken
 )";
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48577.152816.patch
Type: text/x-patch
Size: 2668 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180626/69fe19ba/attachment.bin>


More information about the llvm-commits mailing list