[cfe-commits] r89247 - /cfe/trunk/lib/Driver/OptTable.cpp
Daniel Dunbar
daniel at zuster.org
Wed Nov 18 13:42:57 PST 2009
Author: ddunbar
Date: Wed Nov 18 15:42:57 2009
New Revision: 89247
URL: http://llvm.org/viewvc/llvm-project?rev=89247&view=rev
Log:
Make MSVC happy.
Modified:
cfe/trunk/lib/Driver/OptTable.cpp
Modified: cfe/trunk/lib/Driver/OptTable.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/OptTable.cpp?rev=89247&r1=89246&r2=89247&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/OptTable.cpp (original)
+++ cfe/trunk/lib/Driver/OptTable.cpp Wed Nov 18 15:42:57 2009
@@ -44,6 +44,8 @@
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 @@
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 @@
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);
More information about the cfe-commits
mailing list