diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 09:08:18 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 09:08:18 +0000 | 
| commit | 5ca98fd98791947eba83a1ed3f2c8191ef7afa6c (patch) | |
| tree | f5944309621cee4fe0976be6f9ac619b7ebfc4c2 /lib/Option/OptTable.cpp | |
| parent | 68bcb7db193e4bc81430063148253d30a791023e (diff) | |
Notes
Diffstat (limited to 'lib/Option/OptTable.cpp')
| -rw-r--r-- | lib/Option/OptTable.cpp | 10 | 
1 files changed, 5 insertions, 5 deletions
| diff --git a/lib/Option/OptTable.cpp b/lib/Option/OptTable.cpp index 6fa459a0066ce..6842f4d57919c 100644 --- a/lib/Option/OptTable.cpp +++ b/lib/Option/OptTable.cpp @@ -62,7 +62,7 @@ static inline bool operator<(const OptTable::Info &A, const OptTable::Info &B) {    for (const char * const *APre = A.Prefixes,                    * const *BPre = B.Prefixes; -                          *APre != 0 && *BPre != 0; ++APre, ++BPre) { +                          *APre != nullptr && *BPre != nullptr; ++APre, ++BPre){      if (int N = StrCmpOptionName(*APre, *BPre))        return N < 0;    } @@ -136,7 +136,7 @@ OptTable::OptTable(const Info *_OptionInfos, unsigned _NumOptionInfos,    for (unsigned i = FirstSearchableIndex + 1, e = getNumOptions() + 1;                  i != e; ++i) {      if (const char *const *P = getInfo(i).Prefixes) { -      for (; *P != 0; ++P) { +      for (; *P != nullptr; ++P) {          PrefixesUnion.insert(*P);        }      } @@ -160,7 +160,7 @@ OptTable::~OptTable() {  const Option OptTable::getOption(OptSpecifier Opt) const {    unsigned id = Opt.getID();    if (id == 0) -    return Option(0, 0); +    return Option(nullptr, nullptr);    assert((unsigned) (id - 1) < getNumOptions() && "Invalid ID.");    return Option(&getInfo(id), this);  } @@ -178,7 +178,7 @@ static bool isInput(const llvm::StringSet<> &Prefixes, StringRef Arg) {  /// \returns Matched size. 0 means no match.  static unsigned matchOption(const OptTable::Info *I, StringRef Str,                              bool IgnoreCase) { -  for (const char * const *Pre = I->Prefixes; *Pre != 0; ++Pre) { +  for (const char * const *Pre = I->Prefixes; *Pre != nullptr; ++Pre) {      StringRef Prefix(*Pre);      if (Str.startswith(Prefix)) {        StringRef Rest = Str.substr(Prefix.size()); @@ -240,7 +240,7 @@ Arg *OptTable::ParseOneArg(const ArgList &Args, unsigned &Index,      // Otherwise, see if this argument was missing values.      if (Prev != Index) -      return 0; +      return nullptr;    }    // If we failed to find an option and this arg started with /, then it's | 
