diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-04-07 21:53:57 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-04-07 21:53:57 +0000 |
commit | cf55c8e221c1d31a361f99ee49078d261cdf431c (patch) | |
tree | ffd732ba6a0d8ee6a30846cab129eb6143a244d8 /include/llvm/System | |
parent | a0562001d05101975ec88248a0bb5518074543dc (diff) | |
download | external_llvm-cf55c8e221c1d31a361f99ee49078d261cdf431c.zip external_llvm-cf55c8e221c1d31a361f99ee49078d261cdf431c.tar.gz external_llvm-cf55c8e221c1d31a361f99ee49078d261cdf431c.tar.bz2 |
Added method Path::getDirname().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49352 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/System')
-rw-r--r-- | include/llvm/System/Path.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/System/Path.h b/include/llvm/System/Path.h index 1178d68..5846fa9 100644 --- a/include/llvm/System/Path.h +++ b/include/llvm/System/Path.h @@ -269,6 +269,10 @@ namespace sys { /// @returns std::string containing the basename of the path /// @brief Get the base name of the path std::string getBasename() const; + + /// This function strips off the suffix of the path beginning with the + /// path separator ('/' on Unix, '\' on Windows) and returns the result. + std::string getDirname() const; /// This function strips off the path and basename(up to and /// including the last dot) of the file or directory name and @@ -567,11 +571,19 @@ 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 /// @{ protected: mutable std::string path; ///< Storage for the path name. + /// @} }; |