summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2013-06-13 18:12:12 +0000
committerReid Kleckner <reid@kleckner.net>2013-06-13 18:12:12 +0000
commit1ee21dc1e11abdc56102d0f54265af73f5468bf9 (patch)
tree13868c0706d40e52c24b6a89fb8f3d3ed5c58031 /include
parenta65ee83ea96f367eff8d00b86c44b38d04819d1a (diff)
downloadllvm-1ee21dc1e11abdc56102d0f54265af73f5468bf9.tar.gz
llvm-1ee21dc1e11abdc56102d0f54265af73f5468bf9.tar.bz2
llvm-1ee21dc1e11abdc56102d0f54265af73f5468bf9.tar.xz
Merge changes to clang's Driver code into LLVM's Option library
This is in preparation for switching the clang driver over to using LLVM's Option library. Richard Smith introduced most of these changes to the clang driver in r167638. Reviewers: espindola on IRC Differential Revision: http://llvm-reviews.chandlerc.com/D970 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183925 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Option/ArgList.h9
-rw-r--r--include/llvm/Option/OptTable.h11
2 files changed, 16 insertions, 4 deletions
diff --git a/include/llvm/Option/ArgList.h b/include/llvm/Option/ArgList.h
index d3accfe7f1..06ba679c2b 100644
--- a/include/llvm/Option/ArgList.h
+++ b/include/llvm/Option/ArgList.h
@@ -222,8 +222,17 @@ public:
/// negation are present, the last one wins.
bool hasFlag(OptSpecifier Pos, OptSpecifier Neg, bool Default=true) const;
+ /// hasFlag - Given an option \p Pos, an alias \p PosAlias and its negative
+ /// form \p Neg, return true if the option or its alias is present, false if
+ /// the negation is present, and \p Default if none of the options are
+ /// given. If multiple options are present, the last one wins.
+ bool hasFlag(OptSpecifier Pos, OptSpecifier PosAlias, OptSpecifier Neg,
+ bool Default = true) const;
+
/// AddLastArg - Render only the last argument match \p Id0, if present.
void AddLastArg(ArgStringList &Output, OptSpecifier Id0) const;
+ void AddLastArg(ArgStringList &Output, OptSpecifier Id0,
+ OptSpecifier Id1) const;
/// AddAllArgs - Render all arguments matching the given ids.
void AddAllArgs(ArgStringList &Output, OptSpecifier Id0,
diff --git a/include/llvm/Option/OptTable.h b/include/llvm/Option/OptTable.h
index a93acbf11e..11f489873a 100644
--- a/include/llvm/Option/OptTable.h
+++ b/include/llvm/Option/OptTable.h
@@ -99,9 +99,6 @@ public:
return getInfo(id).GroupID;
}
- /// \brief Should the help for the given option be hidden by default.
- bool isOptionHelpHidden(OptSpecifier id) const;
-
/// \brief Get the help text to use to describe this option.
const char *getOptionHelpText(OptSpecifier id) const {
return getInfo(id).HelpText;
@@ -151,7 +148,13 @@ public:
/// \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.
+ /// \param FlagsToInclude - If non-zero, only include options with any
+ /// of these flags set.
+ /// \param FlagsToExclude - Exclude options with any of these flags set.
+ void PrintHelp(raw_ostream &OS, const char *Name,
+ const char *Title, unsigned FlagsToInclude,
+ unsigned FlagsToExclude) const;
+
void PrintHelp(raw_ostream &OS, const char *Name,
const char *Title, bool ShowHidden = false) const;
};