aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/OptTable.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-11-18 21:42:57 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-11-18 21:42:57 +0000
commit1ce9cf06b6618b5a1e9d96995f914f48fe92bec6 (patch)
tree1bc3edec685d84fe07e3b0276720ec3823299700 /lib/Driver/OptTable.cpp
parent65bdbfa6ca6b9a1170e052cc567d098d0f99cdae (diff)
Make MSVC happy.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89247 91177308-0d34-0410-b5e6-96231b3b80d8
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);