summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Support/Unix/Path.inc17
-rw-r--r--llvm/lib/Support/Windows/Path.inc16
2 files changed, 0 insertions, 33 deletions
diff --git a/llvm/lib/Support/Unix/Path.inc b/llvm/lib/Support/Unix/Path.inc
index b17b9f91dec..f604a79849c 100644
--- a/llvm/lib/Support/Unix/Path.inc
+++ b/llvm/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/llvm/lib/Support/Windows/Path.inc b/llvm/lib/Support/Windows/Path.inc
index 734e6f50d80..f2029841c58 100644
--- a/llvm/lib/Support/Windows/Path.inc
+++ b/llvm/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());
OpenPOWER on IntegriCloud