improve win32 path support, patch by Baptiste Lepilleur!
authorChris Lattner <sabre@nondot.org>
Wed, 12 Aug 2009 17:47:06 +0000 (17:47 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 12 Aug 2009 17:47:06 +0000 (17:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78823 91177308-0d34-0410-b5e6-96231b3b80d8

lib/System/Win32/Path.inc

index 80c7bd9eabeeb6d7e54b6f63e1521d6107427dca..fccf001b3554f2ef38aef9ecbdf8d8ec4ea8b3cf 100644 (file)
@@ -156,7 +156,8 @@ Path::isAbsolute(const char *NameStart, unsigned NameLen) {
   case 2:
     return NameStart[0] == '/';
   default:
-    return NameStart[0] == '/' || (NameStart[1] == ':' && NameStart[2] == '/');
+    return (NameStart[0] == '/' || (NameStart[1] == ':' && NameStart[2] == '/')) ||
+           (NameStart[0] == '\\' || (NameStart[1] == ':' && NameStart[2] == '\\'));
   }
 }