mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Remove Path::getBasename.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183779 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -256,22 +256,6 @@ StringRef Path::getDirname() const {
|
||||
return getDirnameCharSep(path, "/");
|
||||
}
|
||||
|
||||
StringRef
|
||||
Path::getBasename() const {
|
||||
// Find the last slash
|
||||
size_t slash = path.rfind('/');
|
||||
if (slash == std::string::npos)
|
||||
slash = 0;
|
||||
else
|
||||
slash++;
|
||||
|
||||
size_t dot = path.rfind('.');
|
||||
if (dot == std::string::npos || dot < slash)
|
||||
return StringRef(path).substr(slash);
|
||||
else
|
||||
return StringRef(path).substr(slash, dot - slash);
|
||||
}
|
||||
|
||||
StringRef
|
||||
Path::getSuffix() const {
|
||||
// Find the last slash
|
||||
|
Reference in New Issue
Block a user