aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/OptTable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Driver/OptTable.cpp')
-rw-r--r--lib/Driver/OptTable.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/Driver/OptTable.cpp b/lib/Driver/OptTable.cpp
index 67e3019e0f..6065b2df22 100644
--- a/lib/Driver/OptTable.cpp
+++ b/lib/Driver/OptTable.cpp
@@ -44,6 +44,8 @@ static int StrCmpOptionName(const char *A, const char *B) {
return (a < b) ? -1 : 1;
}
+namespace clang {
+namespace driver {
static inline bool operator<(const OptTable::Info &A, const OptTable::Info &B) {
if (&A == &B)
return false;
@@ -58,6 +60,16 @@ static inline bool operator<(const OptTable::Info &A, const OptTable::Info &B) {
return B.Kind == Option::JoinedClass;
}
+// Support lower_bound between info and an option name.
+static inline bool operator<(const OptTable::Info &I, const char *Name) {
+ return StrCmpOptionName(I.Name, Name) == -1;
+}
+static inline bool operator<(const char *Name, const OptTable::Info &I) {
+ return StrCmpOptionName(Name, I.Name) == -1;
+}
+}
+}
+
//
OptTable::OptTable(const Info *_OptionInfos, unsigned _NumOptionInfos)
@@ -164,18 +176,6 @@ Option *OptTable::CreateOption(unsigned id) const {
return Opt;
}
-// Support lower_bound between info and an option name.
-namespace clang {
-namespace driver {
-static inline bool operator<(const OptTable::Info &I, const char *Name) {
- return StrCmpOptionName(I.Name, Name) == -1;
-}
-static inline bool operator<(const char *Name, const OptTable::Info &I) {
- return StrCmpOptionName(Name, I.Name) == -1;
-}
-}
-}
-
Arg *OptTable::ParseOneArg(const InputArgList &Args, unsigned &Index) const {
unsigned Prev = Index;
const char *Str = Args.getArgString(Index);