llvm.org GIT mirror llvm / 40db5d4
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51393 91177308-0d34-0410-b5e6-96231b3b80d8 Bill Wendling 12 years ago
2 changed file(s) with 15 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
204204 /// Compares \p this Path with \p that Path for equality.
205205 /// @returns true if \p this and \p that refer to the same thing.
206206 /// @brief Equality Operator
207 bool operator==(const Path &that) const {
208 return path == that.path;
209 }
207 bool operator==(const Path &that) const;
210208
211209 /// Compares \p this Path with \p that Path for inequality.
212210 /// @returns true if \p this and \p that refer to different things.
213211 /// @brief Inequality Operator
214 bool operator!=(const Path &that) const {
215 return path != that.path;
216 }
212 bool operator!=(const Path &that) const;
217213
218214 /// Determines if \p this Path is less than \p that Path. This is required
219215 /// so that Path objects can be placed into ordered collections (e.g.
221217 /// the std::string::compare method.
222218 /// @returns true if \p this path is lexicographically less than \p that.
223219 /// @brief Less Than Operator
224 bool operator<(const Path& that) const {
225 return path < that.path;
226 }
220 bool operator<(const Path& that) const;
227221
228222 /// @}
229223 /// @name Path Accessors
2222 //=== WARNING: Implementation here must contain only TRULY operating system
2323 //=== independent code.
2424 //===----------------------------------------------------------------------===//
25
26 bool Path::operator==(const Path &that) const {
27 return path == that.path;
28 }
29
30 bool Path::operator!=(const Path &that) const {
31 return path != that.path;
32 }
33
34 bool Path::operator<(const Path& that) const {
35 return path < that.path;
36 }
2537
2638 std::ostream& llvm::operator<<(std::ostream &strm, const sys::Path &aPath) {
2739 strm << aPath.toString();