diff options
author | Chris Bieneman <beanz@apple.com> | 2015-01-21 22:45:52 +0000 |
---|---|---|
committer | Chris Bieneman <beanz@apple.com> | 2015-01-21 22:45:52 +0000 |
commit | 9e13af7ac377f682d55b3bb3edd3471d247cbd36 (patch) | |
tree | 04068061e56256d8ff5321bc39b92059c107b916 /llvm/include/llvm/Support/CommandLine.h | |
parent | b16b09b154f2a8468dcfaa9a8eb5297d59cbd7cd (diff) | |
download | bcm5719-llvm-9e13af7ac377f682d55b3bb3edd3471d247cbd36.tar.gz bcm5719-llvm-9e13af7ac377f682d55b3bb3edd3471d247cbd36.zip |
Adding a new cl::HideUnrelatedOptions API to allow clang to migrate off cl::getRegisteredOptions.
Summary: cl::getRegisteredOptions really exposes some of the innards of how command line parsing is implemented. Exposing new APIs that allow us to disentangle client code from implementation details will allow us to make more extensive changes to command line parsing.
Reviewers: chandlerc, dexonsmith, beanz
Reviewed By: dexonsmith
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7100
llvm-svn: 226729
Diffstat (limited to 'llvm/include/llvm/Support/CommandLine.h')
-rw-r--r-- | llvm/include/llvm/Support/CommandLine.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/CommandLine.h b/llvm/include/llvm/Support/CommandLine.h index 1c06bf5f8c0..314dd951b2c 100644 --- a/llvm/include/llvm/Support/CommandLine.h +++ b/llvm/include/llvm/Support/CommandLine.h @@ -1889,6 +1889,15 @@ bool ExpandResponseFiles(StringSaver &Saver, TokenizerCallback Tokenizer, SmallVectorImpl<const char *> &Argv, bool MarkEOLs = false); +/// \brief Mark all options not part of this category as cl::ReallyHidden. +/// +/// \param Category the category of options to keep displaying +/// +/// Some tools (like clang-format) like to be able to hide all options that are +/// not specific to the tool. This function allows a tool to specify a single +/// option category to display in the -help output. +void HideUnrelatedOptions(cl::OptionCategory &Category); + } // End namespace cl } // End namespace llvm |