diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-11-18 21:42:57 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-11-18 21:42:57 +0000 |
commit | 7147de2c4ec3c68eb5c70b4fdd5393a07cd75469 (patch) | |
tree | e5b9abbfecd4136800d1d54d00947253966f9107 /clang/lib/Driver/OptTable.cpp | |
parent | 575c3f3d72c6022b6e7d322a098efe65b81e58fd (diff) | |
download | bcm5719-llvm-7147de2c4ec3c68eb5c70b4fdd5393a07cd75469.tar.gz bcm5719-llvm-7147de2c4ec3c68eb5c70b4fdd5393a07cd75469.zip |
Make MSVC happy.
llvm-svn: 89247
Diffstat (limited to 'clang/lib/Driver/OptTable.cpp')
-rw-r--r-- | clang/lib/Driver/OptTable.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/clang/lib/Driver/OptTable.cpp b/clang/lib/Driver/OptTable.cpp index 67e3019e0f2..6065b2df228 100644 --- a/clang/lib/Driver/OptTable.cpp +++ b/clang/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); |