Skip to content

Commit 7e6713e

Browse files
committed
Hide irreleveant command line options of lldb-moduleimport-test
1 parent 9debb38 commit 7e6713e

File tree

1 file changed

+25
-17
lines changed

1 file changed

+25
-17
lines changed

tools/lldb-moduleimport-test/lldb-moduleimport-test.cpp

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -181,30 +181,38 @@ int main(int argc, char **argv) {
181181
INITIALIZE_LLVM();
182182

183183
// Command line handling.
184-
llvm::cl::list<std::string> InputNames(
185-
llvm::cl::Positional, llvm::cl::desc("compiled_swift_file1.o ..."),
186-
llvm::cl::OneOrMore);
184+
using namespace llvm::cl;
185+
static OptionCategory Visible("Specific Options");
186+
HideUnrelatedOptions({&Visible});
187187

188-
llvm::cl::opt<bool> DumpModule(
189-
"dump-module", llvm::cl::desc(
190-
"Dump the imported module after checking it imports just fine"));
188+
list<std::string> InputNames(Positional, desc("compiled_swift_file1.o ..."),
189+
OneOrMore, cat(Visible));
191190

192-
llvm::cl::opt<bool> Verbose(
193-
"verbose", llvm::cl::desc("Dump informations on the loaded module"));
191+
opt<bool> DumpModule(
192+
"dump-module",
193+
desc("Dump the imported module after checking it imports just fine"),
194+
cat(Visible));
194195

195-
llvm::cl::opt<std::string> ModuleCachePath(
196-
"module-cache-path", llvm::cl::desc("Clang module cache path"));
196+
opt<bool> Verbose("verbose", desc("Dump informations on the loaded module"),
197+
cat(Visible));
197198

198-
llvm::cl::opt<std::string> DumpDeclFromMangled(
199-
"decl-from-mangled", llvm::cl::desc("dump decl from mangled names list"));
199+
opt<std::string> ModuleCachePath(
200+
"module-cache-path", desc("Clang module cache path"), cat(Visible));
200201

201-
llvm::cl::opt<std::string> DumpTypeFromMangled(
202-
"type-from-mangled", llvm::cl::desc("dump type from mangled names list"));
202+
opt<std::string> DumpDeclFromMangled(
203+
"decl-from-mangled", desc("dump decl from mangled names list"),
204+
cat(Visible));
203205

204-
llvm::cl::opt<std::string> ResourceDir("resource-dir",
205-
llvm::cl::desc("The directory that holds the compiler resource files"));
206+
opt<std::string> DumpTypeFromMangled(
207+
"type-from-mangled", desc("dump type from mangled names list"),
208+
cat(Visible));
206209

207-
llvm::cl::ParseCommandLineOptions(argc, argv);
210+
opt<std::string> ResourceDir(
211+
"resource-dir",
212+
desc("The directory that holds the compiler resource files"),
213+
cat(Visible));
214+
215+
ParseCommandLineOptions(argc, argv);
208216
// Unregister our options so they don't interfere with the command line
209217
// parsing in CodeGen/BackendUtil.cpp.
210218
ModuleCachePath.removeArgument();

0 commit comments

Comments
 (0)