[llvm-commits] [llvm] r51393 - in /llvm/trunk: include/llvm/System/Path.h lib/System/Path.cpp
Bill Wendling
isanbard at gmail.com
Wed May 21 14:20:07 PDT 2008
Author: void
Date: Wed May 21 16:20:07 2008
New Revision: 51393
URL: http://llvm.org/viewvc/llvm-project?rev=51393&view=rev
Log:
Follow-up to the reverting of r51218. This puts the checks out-of-line. Because
they aren't in the header file, systems with a <string> header file that isn't
64-bit clean shouldn't warn if #including Path.h and specifying
-Wshorten-64-to-32.
Modified:
llvm/trunk/include/llvm/System/Path.h
llvm/trunk/lib/System/Path.cpp
Modified: llvm/trunk/include/llvm/System/Path.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/System/Path.h?rev=51393&r1=51392&r2=51393&view=diff
==============================================================================
--- llvm/trunk/include/llvm/System/Path.h (original)
+++ llvm/trunk/include/llvm/System/Path.h Wed May 21 16:20:07 2008
@@ -205,16 +205,12 @@
/// Compares \p this Path with \p that Path for equality.
/// @returns true if \p this and \p that refer to the same thing.
/// @brief Equality Operator
- bool operator==(const Path &that) const {
- return path == that.path;
- }
+ bool operator==(const Path &that) const;
/// 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 path != that.path;
- }
+ bool operator!=(const Path &that) const;
/// Determines if \p this Path is less than \p that Path. This is required
/// so that Path objects can be placed into ordered collections (e.g.
@@ -222,9 +218,7 @@
/// the std::string::compare method.
/// @returns true if \p this path is lexicographically less than \p that.
/// @brief Less Than Operator
- bool operator<(const Path& that) const {
- return path < that.path;
- }
+ bool operator<(const Path& that) const;
/// @}
/// @name Path Accessors
Modified: llvm/trunk/lib/System/Path.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Path.cpp?rev=51393&r1=51392&r2=51393&view=diff
==============================================================================
--- llvm/trunk/lib/System/Path.cpp (original)
+++ llvm/trunk/lib/System/Path.cpp Wed May 21 16:20:07 2008
@@ -24,6 +24,18 @@
//=== independent code.
//===----------------------------------------------------------------------===//
+bool Path::operator==(const Path &that) const {
+ return path == that.path;
+}
+
+bool Path::operator!=(const Path &that) const {
+ return path != that.path;
+}
+
+bool Path::operator<(const Path& that) const {
+ return path < that.path;
+}
+
std::ostream& llvm::operator<<(std::ostream &strm, const sys::Path &aPath) {
strm << aPath.toString();
return strm;
More information about the llvm-commits
mailing list