Remove Path::getLast.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183778 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2013-06-11 19:25:17 +00:00
parent 189c27e871
commit aab313f80b
3 changed files with 0 additions and 49 deletions

View File

@@ -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) {