From fa3a9f7a981466b08e308efcf919ad50ef206bd9 Mon Sep 17 00:00:00 2001 From: James Henderson Date: Tue, 11 Jun 2019 10:20:07 +0000 Subject: [PATCH] [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 llvm-svn: 363044 --- docs/CommandGuide/llvm-dwarfdump.rst | 2 +- test/tools/llvm-dwarfdump/cmdline.test | 5 +++-- tools/llvm-dwarfdump/llvm-dwarfdump.cpp | 9 ++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/CommandGuide/llvm-dwarfdump.rst b/docs/CommandGuide/llvm-dwarfdump.rst index a3b62664cbe..f8e30ebaa17 100644 --- a/docs/CommandGuide/llvm-dwarfdump.rst +++ b/docs/CommandGuide/llvm-dwarfdump.rst @@ -69,7 +69,7 @@ OPTIONS Lookup
in the debug information and print out the file, function, block, and line table details. -.. option:: -o , --out-file= +.. option:: -o Redirect output to a file specified by . diff --git a/test/tools/llvm-dwarfdump/cmdline.test b/test/tools/llvm-dwarfdump/cmdline.test index bbcb14933dc..e9c2a14bfde 100644 --- a/test/tools/llvm-dwarfdump/cmdline.test +++ b/test/tools/llvm-dwarfdump/cmdline.test @@ -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] HELP-NOT: -reverse-iterate HELP: Color Options @@ -13,6 +13,7 @@ HELP: -find HELP: -ignore-case HELP: -lookup HELP: -name +HELP: -o= HELP: -parent-recurse-depth= HELP: -recurse-depth= HELP: -regex diff --git a/tools/llvm-dwarfdump/llvm-dwarfdump.cpp b/tools/llvm-dwarfdump/llvm-dwarfdump.cpp index 34117f79a61..4109b6f90c2 100644 --- a/tools/llvm-dwarfdump/llvm-dwarfdump.cpp +++ b/tools/llvm-dwarfdump/llvm-dwarfdump.cpp @@ -160,12 +160,11 @@ static opt "available file, function, block and line table details."), value_desc("address"), cat(DwarfDumpCategory)); static opt - 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 UseRegex("regex", desc("Treat any strings as regular expressions when "