llvm.org GIT mirror llvm / 0eab5e2
add a helper method to sys::Path for clang, patch by Kovarththanan Rajaratnam! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54655 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 12 years ago
3 changed file(s) with 19 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
201201 return *this;
202202 }
203203
204 /// Makes a copy of \p that to \p this.
205 /// @param \p that A std::string denoting the path
206 /// @returns \p this
207 /// @brief Assignment Operator
208 Path &operator=(const std::string &that);
209
204210 /// Compares \p this Path with \p that Path for equality.
205211 /// @returns true if \p this and \p that refer to the same thing.
206212 /// @brief Equality Operator
7979
8080 Path::Path(const char *StrStart, unsigned StrLen)
8181 : path(StrStart, StrLen) {}
82
83 Path&
84 Path::operator=(const std::string &that) {
85 path = that;
86 return *this;
87 }
8288
8389 bool
8490 Path::isValid() const {
5555 FlipBackSlashes(path);
5656 }
5757
58 Path&
59 Path::operator=(const std::string &that) {
60 path = that;
61 FlipBackSlashes(path);
62 return *this;
63 }
64
5865 bool
5966 Path::isValid() const {
6067 if (path.empty())