[llvm] r363044 - [llvm-dwarfdump] Add -o to help text and remove --out-file from doc

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 11 03:20:07 PDT 2019


Author: jhenderson
Date: Tue Jun 11 03:20:07 2019
New Revision: 363044

URL: http://llvm.org/viewvc/llvm-project?rev=363044&view=rev
Log:
[llvm-dwarfdump] Add -o to help text and remove --out-file from doc

-o is in the documentation, but not in the llvm-dwarfdump help text.
This patch adds it by inverting the -o and --out-file aliasing. It also
removes --out-file from the documentation, since we don't really want
people to be using this switch in practice.

Reviewed by: aprantl, JDevlieghere, dblaikie

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

Modified:
    llvm/trunk/docs/CommandGuide/llvm-dwarfdump.rst
    llvm/trunk/test/tools/llvm-dwarfdump/cmdline.test
    llvm/trunk/tools/llvm-dwarfdump/llvm-dwarfdump.cpp

Modified: llvm/trunk/docs/CommandGuide/llvm-dwarfdump.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CommandGuide/llvm-dwarfdump.rst?rev=363044&r1=363043&r2=363044&view=diff
==============================================================================
--- llvm/trunk/docs/CommandGuide/llvm-dwarfdump.rst (original)
+++ llvm/trunk/docs/CommandGuide/llvm-dwarfdump.rst Tue Jun 11 03:20:07 2019
@@ -69,7 +69,7 @@ OPTIONS
             Lookup <address> in the debug information and print out the file,
             function, block, and line table details.
 
-.. option:: -o <path>, --out-file=<path>
+.. option:: -o <path>
 
             Redirect output to a file specified by <path>.
 

Modified: llvm/trunk/test/tools/llvm-dwarfdump/cmdline.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-dwarfdump/cmdline.test?rev=363044&r1=363043&r2=363044&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-dwarfdump/cmdline.test (original)
+++ llvm/trunk/test/tools/llvm-dwarfdump/cmdline.test Tue Jun 11 03:20:07 2019
@@ -1,5 +1,5 @@
-RUN: llvm-dwarfdump -h 2>&1 | FileCheck --check-prefix=HELP %s
-RUN: llvm-dwarfdump --help 2>&1 | FileCheck --check-prefix=HELP %s
+RUN: llvm-dwarfdump -h 2>&1 | FileCheck --check-prefix=HELP %s --implicit-check-not=out-file
+RUN: llvm-dwarfdump --help 2>&1 | FileCheck --check-prefix=HELP %s --implicit-check-not=out-file
 HELP: USAGE: llvm-dwarfdump{{[^ ]*}} [options] <input object files or .dSYM bundles>
 HELP-NOT: -reverse-iterate
 HELP: Color Options
@@ -13,6 +13,7 @@ HELP: -find
 HELP: -ignore-case
 HELP: -lookup
 HELP: -name
+HELP: -o=<filename>
 HELP: -parent-recurse-depth=<N>
 HELP: -recurse-depth=<N>
 HELP: -regex

Modified: llvm/trunk/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-dwarfdump/llvm-dwarfdump.cpp?rev=363044&r1=363043&r2=363044&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-dwarfdump/llvm-dwarfdump.cpp (original)
+++ llvm/trunk/tools/llvm-dwarfdump/llvm-dwarfdump.cpp Tue Jun 11 03:20:07 2019
@@ -160,12 +160,11 @@ static opt<uint64_t>
                 "available file, function, block and line table details."),
            value_desc("address"), cat(DwarfDumpCategory));
 static opt<std::string>
-    OutputFilename("out-file", cl::init("-"),
+    OutputFilename("o", cl::init("-"),
                    cl::desc("Redirect output to the specified file."),
-                   cl::value_desc("filename"));
-static alias OutputFilenameAlias("o", desc("Alias for -out-file."),
-                                 aliasopt(OutputFilename),
-                                 cat(DwarfDumpCategory));
+                   cl::value_desc("filename"), cat(DwarfDumpCategory));
+static alias OutputFilenameAlias("out-file", desc("Alias for -o."),
+                                 aliasopt(OutputFilename));
 static opt<bool>
     UseRegex("regex",
              desc("Treat any <pattern> strings as regular expressions when "




More information about the llvm-commits mailing list