diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-12-04 21:08:25 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-12-04 21:08:25 +0000 |
commit | 9a242512a8b319cc4df7d050166a1c65bf66abeb (patch) | |
tree | 9c9d7f3bea89a7f89478ebf12c08df96c5737edb /include/clang/Driver/OptTable.h | |
parent | 2421f66b945510c7d049f6d89e7cc57d0013add8 (diff) |
OptParser: Add HelpHidden flag.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90591 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Driver/OptTable.h')
-rw-r--r-- | include/clang/Driver/OptTable.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/include/clang/Driver/OptTable.h b/include/clang/Driver/OptTable.h index ff2e108609..840e669a27 100644 --- a/include/clang/Driver/OptTable.h +++ b/include/clang/Driver/OptTable.h @@ -22,12 +22,13 @@ namespace driver { namespace options { enum DriverFlag { DriverOption = (1 << 0), - LinkerInput = (1 << 1), - NoArgumentUnused = (1 << 2), - RenderAsInput = (1 << 3), - RenderJoined = (1 << 4), - RenderSeparate = (1 << 5), - Unsupported = (1 << 6) + HelpHidden = (1 << 1), + LinkerInput = (1 << 2), + NoArgumentUnused = (1 << 3), + RenderAsInput = (1 << 4), + RenderJoined = (1 << 5), + RenderSeparate = (1 << 6), + Unsupported = (1 << 7) }; } @@ -117,6 +118,12 @@ namespace options { return getInfo(id).Kind; } + /// isOptionHelpHidden - Should the help for the given option be hidden by + /// default. + bool isOptionHelpHidden(OptSpecifier id) const { + return getInfo(id).Flags & options::HelpHidden; + } + /// getOptionHelpText - Get the help text to use to describe this option. const char *getOptionHelpText(OptSpecifier id) const { return getInfo(id).HelpText; @@ -166,8 +173,9 @@ namespace options { /// \param OS - The stream to write the help text to. /// \param Name - The name to use in the usage line. /// \param Title - The title to use in the usage line. + /// \param ShowHidden - Whether help-hidden arguments should be shown. void PrintHelp(llvm::raw_ostream &OS, const char *Name, - const char *Title) const; + const char *Title, bool ShowHidden = false) const; }; } } |