diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 17:02:24 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 17:02:24 +0000 |
commit | 91bc56ed825ba56b3cc264aa5c95ab84f86832ab (patch) | |
tree | 4df130b28021d86e13bf4565ef58c1c5a5e093b4 /contrib/llvm/lib/Option/Option.cpp | |
parent | 9efc7e72bb1daf5d6019871d9c93a1c488a11229 (diff) | |
parent | 5ca98fd98791947eba83a1ed3f2c8191ef7afa6c (diff) |
Merge llvm 3.5.0 release from ^/vendor/llvm/dist, resolve conflicts, and
preserve our customizations, where necessary.
Notes
Notes:
svn path=/projects/clang350-import/; revision=274968
Diffstat (limited to 'contrib/llvm/lib/Option/Option.cpp')
-rw-r--r-- | contrib/llvm/lib/Option/Option.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/contrib/llvm/lib/Option/Option.cpp b/contrib/llvm/lib/Option/Option.cpp index 7b5ff2be9a79..10662a33c270 100644 --- a/contrib/llvm/lib/Option/Option.cpp +++ b/contrib/llvm/lib/Option/Option.cpp @@ -58,8 +58,8 @@ void Option::dump() const { if (Info->Prefixes) { llvm::errs() << " Prefixes:["; - for (const char * const *Pre = Info->Prefixes; *Pre != 0; ++Pre) { - llvm::errs() << '"' << *Pre << (*(Pre + 1) == 0 ? "\"" : "\", "); + for (const char * const *Pre = Info->Prefixes; *Pre != nullptr; ++Pre) { + llvm::errs() << '"' << *Pre << (*(Pre + 1) == nullptr ? "\"" : "\", "); } llvm::errs() << ']'; } @@ -116,7 +116,7 @@ Arg *Option::accept(const ArgList &Args, switch (getKind()) { case FlagClass: { if (ArgSize != strlen(Args.getArgString(Index))) - return 0; + return nullptr; Arg *A = new Arg(UnaliasedOption, Spelling, Index++); if (getAliasArgs()) { @@ -166,11 +166,11 @@ Arg *Option::accept(const ArgList &Args, // Matches iff this is an exact match. // FIXME: Avoid strlen. if (ArgSize != strlen(Args.getArgString(Index))) - return 0; + return nullptr; Index += 2; if (Index > Args.getNumInputArgStrings()) - return 0; + return nullptr; return new Arg(UnaliasedOption, Spelling, Index - 2, Args.getArgString(Index - 1)); @@ -178,11 +178,11 @@ Arg *Option::accept(const ArgList &Args, // Matches iff this is an exact match. // FIXME: Avoid strlen. if (ArgSize != strlen(Args.getArgString(Index))) - return 0; + return nullptr; Index += 1 + getNumArgs(); if (Index > Args.getNumInputArgStrings()) - return 0; + return nullptr; Arg *A = new Arg(UnaliasedOption, Spelling, Index - 1 - getNumArgs(), Args.getArgString(Index - getNumArgs())); @@ -201,7 +201,7 @@ Arg *Option::accept(const ArgList &Args, // Otherwise it must be separate. Index += 2; if (Index > Args.getNumInputArgStrings()) - return 0; + return nullptr; return new Arg(UnaliasedOption, Spelling, Index - 2, Args.getArgString(Index - 1)); @@ -210,7 +210,7 @@ Arg *Option::accept(const ArgList &Args, // Always matches. Index += 2; if (Index > Args.getNumInputArgStrings()) - return 0; + return nullptr; return new Arg(UnaliasedOption, Spelling, Index - 2, Args.getArgString(Index - 2) + ArgSize, @@ -219,7 +219,7 @@ Arg *Option::accept(const ArgList &Args, // Matches iff this is an exact match. // FIXME: Avoid strlen. if (ArgSize != strlen(Args.getArgString(Index))) - return 0; + return nullptr; Arg *A = new Arg(UnaliasedOption, Spelling, Index++); while (Index < Args.getNumInputArgStrings()) A->getValues().push_back(Args.getArgString(Index++)); |