mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
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:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user