From 34b9bbb74d0bd77b1502bbef41bb9cf26c62e811 Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Tue, 21 Jul 2020 15:36:31 +0300 Subject: [PATCH] [NFC][Reduce] Group llvm-reduce options into a group, uncluttering --help --- llvm/tools/llvm-reduce/llvm-reduce.cpp | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/llvm/tools/llvm-reduce/llvm-reduce.cpp b/llvm/tools/llvm-reduce/llvm-reduce.cpp index 036d0ee75305..9dd8aa4a938e 100644 --- a/llvm/tools/llvm-reduce/llvm-reduce.cpp +++ b/llvm/tools/llvm-reduce/llvm-reduce.cpp @@ -28,30 +28,39 @@ using namespace llvm; -static cl::opt Help("h", cl::desc("Alias for -help"), cl::Hidden); -static cl::opt Version("v", cl::desc("Alias for -version"), cl::Hidden); +static cl::OptionCategory Options("llvm-reduce options"); + +static cl::opt Help("h", cl::desc("Alias for -help"), cl::Hidden, + cl::cat(Options)); +static cl::opt Version("v", cl::desc("Alias for -version"), cl::Hidden, + cl::cat(Options)); static cl::opt InputFilename(cl::Positional, cl::Required, - cl::desc("")); + cl::desc(""), + cl::cat(Options)); static cl::opt TestFilename("test", cl::Required, - cl::desc("Name of the interesting-ness test to be run")); + cl::desc("Name of the interesting-ness test to be run"), + cl::cat(Options)); static cl::list TestArguments("test-arg", cl::ZeroOrMore, - cl::desc("Arguments passed onto the interesting-ness test")); + cl::desc("Arguments passed onto the interesting-ness test"), + cl::cat(Options)); static cl::opt OutputFilename("output", cl::desc("Specify the output file. default: reduced.ll")); static cl::alias OutputFileAlias("o", cl::desc("Alias for -output"), - cl::aliasopt(OutputFilename)); + cl::aliasopt(OutputFilename), + cl::cat(Options)); static cl::opt ReplaceInput("in-place", cl::desc("WARNING: This option will replace your input file " - "with the reduced version!")); + "with the reduced version!"), + cl::cat(Options)); // Parses IR into a Module and verifies it static std::unique_ptr parseInputFile(StringRef Filename,