mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
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
This commit is contained in:
parent
b8cd4d3d49
commit
0eab5e2efa
@ -202,6 +202,12 @@ namespace sys {
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Makes a copy of \p that to \p this.
|
||||||
|
/// @param \p that A std::string denoting the path
|
||||||
|
/// @returns \p this
|
||||||
|
/// @brief Assignment Operator
|
||||||
|
Path &operator=(const std::string &that);
|
||||||
|
|
||||||
/// Compares \p this Path with \p that Path for equality.
|
/// Compares \p this Path with \p that Path for equality.
|
||||||
/// @returns true if \p this and \p that refer to the same thing.
|
/// @returns true if \p this and \p that refer to the same thing.
|
||||||
/// @brief Equality Operator
|
/// @brief Equality Operator
|
||||||
|
@ -81,6 +81,12 @@ Path::Path(const std::string& p)
|
|||||||
Path::Path(const char *StrStart, unsigned StrLen)
|
Path::Path(const char *StrStart, unsigned StrLen)
|
||||||
: path(StrStart, StrLen) {}
|
: path(StrStart, StrLen) {}
|
||||||
|
|
||||||
|
Path&
|
||||||
|
Path::operator=(const std::string &that) {
|
||||||
|
path = that;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Path::isValid() const {
|
Path::isValid() const {
|
||||||
// Check some obvious things
|
// Check some obvious things
|
||||||
|
@ -56,6 +56,13 @@ Path::Path(const char *StrStart, unsigned StrLen)
|
|||||||
FlipBackSlashes(path);
|
FlipBackSlashes(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Path&
|
||||||
|
Path::operator=(const std::string &that) {
|
||||||
|
path = that;
|
||||||
|
FlipBackSlashes(path);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Path::isValid() const {
|
Path::isValid() const {
|
||||||
if (path.empty())
|
if (path.empty())
|
||||||
|
Loading…
Reference in New Issue
Block a user