From fa2bbb31fae64bc8cc3dc3736f5465d3ddba1704 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 12 Jun 2013 15:02:39 +0000 Subject: Remove Path::isAbsolute. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183836 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/Unix/Path.inc | 8 -------- lib/Support/Windows/Path.inc | 18 ------------------ 2 files changed, 26 deletions(-) (limited to 'lib/Support') diff --git a/lib/Support/Unix/Path.inc b/lib/Support/Unix/Path.inc index ea8a050acc..ecdc2abe3a 100644 --- a/lib/Support/Unix/Path.inc +++ b/lib/Support/Unix/Path.inc @@ -109,14 +109,6 @@ Path::isValid() const { return !path.empty(); } -bool -Path::isAbsolute(const char *NameStart, unsigned NameLen) { - assert(NameStart); - if (NameLen == 0) - return false; - return NameStart[0] == '/'; -} - Path Path::GetTemporaryDirectory(std::string *ErrMsg) { #if defined(HAVE_MKDTEMP) diff --git a/lib/Support/Windows/Path.inc b/lib/Support/Windows/Path.inc index 7cf522d22e..165c18f0a5 100644 --- a/lib/Support/Windows/Path.inc +++ b/lib/Support/Windows/Path.inc @@ -150,24 +150,6 @@ void Path::makeAbsolute() { } } -bool -Path::isAbsolute(const char *NameStart, unsigned NameLen) { - assert(NameStart); - // FIXME: This does not handle correctly an absolute path starting from - // a drive letter or in UNC format. - switch (NameLen) { - case 0: - return false; - case 1: - case 2: - return NameStart[0] == '/'; - default: - return - (NameStart[0] == '/' || (NameStart[1] == ':' && NameStart[2] == '/')) || - (NameStart[0] == '\\' || (NameStart[1] == ':' && NameStart[2] == '\\')); - } -} - static Path *TempDirectory; Path -- cgit v1.2.3