mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 05:29:24 +00:00
Make getDirnameSep a static method (not part of Path's interface).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49354 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cf55c8e221
commit
9b01cc0ede
@ -571,13 +571,6 @@ namespace sys {
|
||||
/// MemoryBuffer::getFile instead.
|
||||
static void UnMapFilePages(const char *Base, uint64_t FileSize);
|
||||
|
||||
|
||||
/// @}
|
||||
/// @name Internal methods.
|
||||
/// @{
|
||||
protected:
|
||||
std::string getDirnameCharSep(char Sep) const;
|
||||
|
||||
/// @}
|
||||
/// @name Data
|
||||
/// @{
|
||||
|
@ -196,7 +196,7 @@ static void getPathList(const char*path, std::vector<Path>& Paths) {
|
||||
Paths.push_back(tmpPath);
|
||||
}
|
||||
|
||||
std::string Path::getDirnameCharSep(char Sep) const {
|
||||
static std::string getDirnameCharSep(const std::string& path, char Sep) {
|
||||
|
||||
if (path.empty())
|
||||
return ".";
|
||||
|
@ -277,7 +277,9 @@ Path Path::GetMainExecutable(const char *argv0, void *MainAddr) {
|
||||
}
|
||||
|
||||
|
||||
std::string Path::getDirname() const { return getDirnameCharSep('/'); }
|
||||
std::string Path::getDirname() const {
|
||||
return getDirnameCharSep(path, '/');
|
||||
}
|
||||
|
||||
std::string
|
||||
Path::getBasename() const {
|
||||
|
@ -229,7 +229,9 @@ Path::isRootDirectory() const {
|
||||
return len > 0 && path[len-1] == '/';
|
||||
}
|
||||
|
||||
std::string Path::getDirname() const { return getDirnameCharSep('\\'); }
|
||||
std::string Path::getDirname() const {
|
||||
return getDirnameCharSep(path, '\\');
|
||||
}
|
||||
|
||||
std::string
|
||||
Path::getBasename() const {
|
||||
|
Loading…
Reference in New Issue
Block a user