System/Path/Windows: Change GetRootDirectory to return file:/// instead of C:/.
authorMichael J. Spencer <bigcheesegs@gmail.com>
Tue, 9 Nov 2010 15:10:45 +0000 (15:10 +0000)
committerMichael J. Spencer <bigcheesegs@gmail.com>
Tue, 9 Nov 2010 15:10:45 +0000 (15:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118502 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/System/Path.h
lib/System/Win32/Path.inc

index a3b9ccc1f0a2a2a080f6b1a87462933bc5c10383..ca1be63bbbf562b9fef4a895c8b799faff43160c 100644 (file)
@@ -89,7 +89,7 @@ namespace sys {
       /// Construct a path to the root directory of the file system. The root
       /// directory is a top level directory above which there are no more
       /// directories. For example, on UNIX, the root directory is /. On Windows
-      /// it is C:\. Other operating systems may have different notions of
+      /// it is file:///. Other operating systems may have different notions of
       /// what the root directory is or none at all. In that case, a consistent
       /// default root directory will be used.
       static Path GetRootDirectory();
index 8e3004d0ac41c3001caca27196b9e527939b110e..75f6b7134a48bfac00d2087b7c5036cdff7478bb 100644 (file)
@@ -233,9 +233,9 @@ Path::GetTemporaryDirectory(std::string* ErrMsg) {
 // FIXME: the following set of functions don't map to Windows very well.
 Path
 Path::GetRootDirectory() {
-  Path result;
-  result.set("C:/");
-  return result;
+  // This is the only notion that that Windows has of a root directory. Nothing
+  // is here except for drives.
+  return Path("file:///");
 }
 
 void