diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-11 19:29:48 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-11 19:29:48 +0000 |
commit | b4d07b770c41b285a613a5b4953fe815044fad19 (patch) | |
tree | e10960166d395f921f7ceddeb6410245af5c47eb /lib/Support/Unix | |
parent | aab313f80bc447ecd3a6073014243b108bac6855 (diff) | |
download | external_llvm-b4d07b770c41b285a613a5b4953fe815044fad19.zip external_llvm-b4d07b770c41b285a613a5b4953fe815044fad19.tar.gz external_llvm-b4d07b770c41b285a613a5b4953fe815044fad19.tar.bz2 |
Remove Path::getBasename.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183779 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Unix')
-rw-r--r-- | lib/Support/Unix/Path.inc | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/lib/Support/Unix/Path.inc b/lib/Support/Unix/Path.inc index 13bf9aa..a442b7f 100644 --- a/lib/Support/Unix/Path.inc +++ b/lib/Support/Unix/Path.inc @@ -324,22 +324,6 @@ StringRef Path::getDirname() const { } StringRef -Path::getBasename() const { - // Find the last slash - std::string::size_type slash = path.rfind('/'); - if (slash == std::string::npos) - slash = 0; - else - slash++; - - std::string::size_type 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 std::string::size_type slash = path.rfind('/'); |