aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Option
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-12-30 11:46:15 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-12-30 11:46:15 +0000
commitdd58ef019b700900793a1eb48b52123db01b654e (patch)
treefcfbb4df56a744f4ddc6122c50521dd3f1c5e196 /include/llvm/Option
parent2fe5752e3a7c345cdb59e869278d36af33c13fa4 (diff)
Notes
Diffstat (limited to 'include/llvm/Option')
-rw-r--r--include/llvm/Option/Arg.h1
-rw-r--r--include/llvm/Option/ArgList.h6
-rw-r--r--include/llvm/Option/OptTable.h8
-rw-r--r--include/llvm/Option/Option.h1
4 files changed, 11 insertions, 5 deletions
diff --git a/include/llvm/Option/Arg.h b/include/llvm/Option/Arg.h
index e1b72b6267cf1..99d329693de2e 100644
--- a/include/llvm/Option/Arg.h
+++ b/include/llvm/Option/Arg.h
@@ -113,6 +113,7 @@ public:
/// when rendered as a input (e.g., Xlinker).
void renderAsInput(const ArgList &Args, ArgStringList &Output) const;
+ void print(raw_ostream &O) const;
void dump() const;
/// \brief Return a formatted version of the argument and
diff --git a/include/llvm/Option/ArgList.h b/include/llvm/Option/ArgList.h
index ef4005761b75c..89771b5c3cf11 100644
--- a/include/llvm/Option/ArgList.h
+++ b/include/llvm/Option/ArgList.h
@@ -259,6 +259,9 @@ public:
void AddLastArg(ArgStringList &Output, OptSpecifier Id0,
OptSpecifier Id1) const;
+ /// AddAllArgs - Render all arguments matching any of the given ids.
+ void AddAllArgs(ArgStringList &Output, ArrayRef<OptSpecifier> Ids) const;
+
/// AddAllArgs - Render all arguments matching the given ids.
void AddAllArgs(ArgStringList &Output, OptSpecifier Id0,
OptSpecifier Id1 = 0U, OptSpecifier Id2 = 0U) const;
@@ -303,6 +306,9 @@ public:
const char *GetOrMakeJoinedArgString(unsigned Index, StringRef LHS,
StringRef RHS) const;
+ void print(raw_ostream &O) const;
+ void dump() const;
+
/// @}
};
diff --git a/include/llvm/Option/OptTable.h b/include/llvm/Option/OptTable.h
index 96f51cf3317d6..390e52774fea5 100644
--- a/include/llvm/Option/OptTable.h
+++ b/include/llvm/Option/OptTable.h
@@ -50,8 +50,7 @@ public:
private:
/// \brief The static option information table.
- const Info *OptionInfos;
- unsigned NumOptionInfos;
+ ArrayRef<Info> OptionInfos;
bool IgnoreCase;
unsigned TheInputOptionID;
@@ -74,14 +73,13 @@ private:
}
protected:
- OptTable(const Info *OptionInfos, unsigned NumOptionInfos,
- bool IgnoreCase = false);
+ OptTable(ArrayRef<Info> OptionInfos, bool IgnoreCase = false);
public:
~OptTable();
/// \brief Return the total number of option classes.
- unsigned getNumOptions() const { return NumOptionInfos; }
+ unsigned getNumOptions() const { return OptionInfos.size(); }
/// \brief Get the given Opt's Option instance, lazily creating it
/// if necessary.
diff --git a/include/llvm/Option/Option.h b/include/llvm/Option/Option.h
index 09be26c7cf203..494987a135ef0 100644
--- a/include/llvm/Option/Option.h
+++ b/include/llvm/Option/Option.h
@@ -195,6 +195,7 @@ public:
/// start.
Arg *accept(const ArgList &Args, unsigned &Index, unsigned ArgSize) const;
+ void print(raw_ostream &O) const;
void dump() const;
};