[llvm] r183836 - Remove Path::isAbsolute.

Rafael Espindola rafael.espindola at gmail.com
Wed Jun 12 08:02:39 PDT 2013


Author: rafael
Date: Wed Jun 12 10:02:39 2013
New Revision: 183836

URL: http://llvm.org/viewvc/llvm-project?rev=183836&view=rev
Log:
Remove Path::isAbsolute.

Modified:
    llvm/trunk/include/llvm/Support/PathV1.h
    llvm/trunk/lib/Support/Unix/Path.inc
    llvm/trunk/lib/Support/Windows/Path.inc

Modified: llvm/trunk/include/llvm/Support/PathV1.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/PathV1.h?rev=183836&r1=183835&r2=183836&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/PathV1.h (original)
+++ llvm/trunk/include/llvm/Support/PathV1.h Wed Jun 12 10:02:39 2013
@@ -219,13 +219,6 @@ namespace sys {
     /// @name Disk Accessors
     /// @{
     public:
-      /// This function determines if the path name is absolute, as opposed to
-      /// relative.
-      /// @brief Determine if the path is absolute.
-      LLVM_ATTRIBUTE_DEPRECATED(
-        static bool isAbsolute(const char *NameStart, unsigned NameLen),
-        LLVM_PATH_DEPRECATED_MSG(path::is_absolute));
-
       /// This function opens the file associated with the path name provided by
       /// the Path object and reads its magic number. If the magic number at the
       /// start of the file matches \p magic, true is returned. In all other

Modified: llvm/trunk/lib/Support/Unix/Path.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Path.inc?rev=183836&r1=183835&r2=183836&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Unix/Path.inc (original)
+++ llvm/trunk/lib/Support/Unix/Path.inc Wed Jun 12 10:02:39 2013
@@ -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)

Modified: llvm/trunk/lib/Support/Windows/Path.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Path.inc?rev=183836&r1=183835&r2=183836&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Windows/Path.inc (original)
+++ llvm/trunk/lib/Support/Windows/Path.inc Wed Jun 12 10:02:39 2013
@@ -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





More information about the llvm-commits mailing list