@@ -181,30 +181,38 @@ int main(int argc, char **argv) {
181
181
INITIALIZE_LLVM ();
182
182
183
183
// 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} );
187
187
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));
191
190
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));
194
195
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 ));
197
198
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 ));
200
201
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));
203
205
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));
206
209
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);
208
216
// Unregister our options so they don't interfere with the command line
209
217
// parsing in CodeGen/BackendUtil.cpp.
210
218
ModuleCachePath.removeArgument ();
0 commit comments