[llvm-commits] [llvm] r51358 - /llvm/trunk/include/llvm/System/Path.h

Dale Johannesen dalej at apple.com
Tue May 20 16:58:56 PDT 2008


On May 20, 2008, at 4:54 PM, Bill Wendling wrote:

> Author: void
> Date: Tue May 20 18:54:27 2008
> New Revision: 51358
>
> URL: http://llvm.org/viewvc/llvm-project?rev=51358&view=rev
> Log:
> Reverting r51218 because of breakage on PPC32.

It also fails for me on x86-32, btw.

> Modified:
>    llvm/trunk/include/llvm/System/Path.h
>
> Modified: llvm/trunk/include/llvm/System/Path.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/System/Path.h?rev=51358&r1=51357&r2=51358&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/include/llvm/System/Path.h (original)
> +++ llvm/trunk/include/llvm/System/Path.h Tue May 20 18:54:27 2008
> @@ -19,7 +19,6 @@
> #include <string>
> #include <vector>
> #include <iosfwd>
> -#include <cstring>
>
> namespace llvm {
> namespace sys {
> @@ -207,14 +206,14 @@
>       /// @returns true if \p this and \p that refer to the same  
> thing.
>       /// @brief Equality Operator
>       bool operator==(const Path &that) const {
> -        return strcmp(path.c_str(), that.path.c_str()) == 0;
> +        return path == that.path;
>       }
>
>       /// Compares \p this Path with \p that Path for inequality.
>       /// @returns true if \p this and \p that refer to different  
> things.
>       /// @brief Inequality Operator
>       bool operator!=(const Path &that) const {
> -        return strcmp(path.c_str(), that.path.c_str()) != 0;
> +        return path != that.path;
>       }
>
>       /// Determines if \p this Path is less than \p that Path. This  
> is required
> @@ -224,7 +223,7 @@
>       /// @returns true if \p this path is lexicographically less  
> than \p that.
>       /// @brief Less Than Operator
>       bool operator<(const Path& that) const {
> -        return strcmp(path.c_str(), that.path.c_str()) < 0;
> +        return path < that.path;
>       }
>
>     /// @}
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list