diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-11 19:25:17 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-11 19:25:17 +0000 |
commit | 7fc279aecb36b6611e386900a1d447df0a0b8fd6 (patch) | |
tree | c61962ca20e908eeba5d18e4002f09af40422d38 /llvm/lib/Support/Windows/Path.inc | |
parent | 0126549185197894a6e44dade906562a1c55694c (diff) | |
download | bcm5719-llvm-7fc279aecb36b6611e386900a1d447df0a0b8fd6.tar.gz bcm5719-llvm-7fc279aecb36b6611e386900a1d447df0a0b8fd6.zip |
Remove Path::getLast.
llvm-svn: 183778
Diffstat (limited to 'llvm/lib/Support/Windows/Path.inc')
-rw-r--r-- | llvm/lib/Support/Windows/Path.inc | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/llvm/lib/Support/Windows/Path.inc b/llvm/lib/Support/Windows/Path.inc index efbb8b2284e..44c89ad8fb6 100644 --- a/llvm/lib/Support/Windows/Path.inc +++ b/llvm/lib/Support/Windows/Path.inc @@ -343,23 +343,6 @@ Path::isRegularFile() const { return res; } -StringRef -Path::getLast() const { - // Find the last slash - size_t pos = path.rfind('/'); - - // Handle the corner cases - if (pos == std::string::npos) - return path; - - // If the last character is a slash, we have a root directory - if (pos == path.length()-1) - return path; - - // Return everything after the last slash - return StringRef(path).substr(pos+1); -} - const FileStatus * PathWithStatus::getFileStatus(bool update, std::string *ErrStr) const { if (!fsIsValid || update) { |