summaryrefslogtreecommitdiff
path: root/lib/Support
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-06-12 14:32:51 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-06-12 14:32:51 +0000
commit55d529fd8a0931999d96829b0e9f0df55d43f85d (patch)
tree794b2b21fced83377402a869a0ec73723dd421df /lib/Support
parent36782c514ae7c5f9270c317bdea660bdcd86d9d6 (diff)
downloadllvm-55d529fd8a0931999d96829b0e9f0df55d43f85d.tar.gz
llvm-55d529fd8a0931999d96829b0e9f0df55d43f85d.tar.bz2
llvm-55d529fd8a0931999d96829b0e9f0df55d43f85d.tar.xz
Remove Path::getSuffix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183833 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r--lib/Support/Unix/Path.inc17
-rw-r--r--lib/Support/Windows/Path.inc16
2 files changed, 0 insertions, 33 deletions
diff --git a/lib/Support/Unix/Path.inc b/lib/Support/Unix/Path.inc
index b17b9f91de..f604a79849 100644
--- a/lib/Support/Unix/Path.inc
+++ b/lib/Support/Unix/Path.inc
@@ -318,23 +318,6 @@ Path Path::GetMainExecutable(const char *argv0, void *MainAddr) {
return Path();
}
-
-StringRef
-Path::getSuffix() 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();
- else
- return StringRef(path).substr(dot + 1);
-}
-
bool Path::getMagicNumber(std::string &Magic, unsigned len) const {
assert(len < 1024 && "Request for magic string too long");
char Buf[1025];
diff --git a/lib/Support/Windows/Path.inc b/lib/Support/Windows/Path.inc
index 734e6f50d8..f2029841c5 100644
--- a/lib/Support/Windows/Path.inc
+++ b/lib/Support/Windows/Path.inc
@@ -250,22 +250,6 @@ Path Path::GetMainExecutable(const char *argv0, void *MainAddr) {
// FIXME: the above set of functions don't map to Windows very well.
-StringRef
-Path::getSuffix() 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("");
- else
- return StringRef(path).substr(dot + 1);
-}
-
bool
Path::exists() const {
DWORD attr = GetFileAttributes(path.c_str());