summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Unix
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-06-11 19:25:17 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-06-11 19:25:17 +0000
commit7fc279aecb36b6611e386900a1d447df0a0b8fd6 (patch)
treec61962ca20e908eeba5d18e4002f09af40422d38 /llvm/lib/Support/Unix
parent0126549185197894a6e44dade906562a1c55694c (diff)
downloadbcm5719-llvm-7fc279aecb36b6611e386900a1d447df0a0b8fd6.tar.gz
bcm5719-llvm-7fc279aecb36b6611e386900a1d447df0a0b8fd6.zip
Remove Path::getLast.
llvm-svn: 183778
Diffstat (limited to 'llvm/lib/Support/Unix')
-rw-r--r--llvm/lib/Support/Unix/Path.inc22
1 files changed, 0 insertions, 22 deletions
diff --git a/llvm/lib/Support/Unix/Path.inc b/llvm/lib/Support/Unix/Path.inc
index e3f20822e51..13bf9aaef92 100644
--- a/llvm/lib/Support/Unix/Path.inc
+++ b/llvm/lib/Support/Unix/Path.inc
@@ -427,28 +427,6 @@ Path::canExecute() const {
return true;
}
-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
- if (pos == path.length()-1) {
- // Find the second to last slash
- size_t pos2 = path.rfind('/', pos-1);
- if (pos2 == std::string::npos)
- return StringRef(path).substr(0,pos);
- else
- return StringRef(path).substr(pos2+1,pos-pos2-1);
- }
- // 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) {
OpenPOWER on IntegriCloud