[llvm-commits] [llvm] r118502 - in /llvm/trunk: include/llvm/System/Path.h lib/System/Win32/Path.inc

Michael J. Spencer bigcheesegs at gmail.com
Tue Nov 9 07:10:45 PST 2010


Author: mspencer
Date: Tue Nov  9 09:10:45 2010
New Revision: 118502

URL: http://llvm.org/viewvc/llvm-project?rev=118502&view=rev
Log:
System/Path/Windows: Change GetRootDirectory to return file:/// instead of C:/.

Modified:
    llvm/trunk/include/llvm/System/Path.h
    llvm/trunk/lib/System/Win32/Path.inc

Modified: llvm/trunk/include/llvm/System/Path.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/System/Path.h?rev=118502&r1=118501&r2=118502&view=diff
==============================================================================
--- llvm/trunk/include/llvm/System/Path.h (original)
+++ llvm/trunk/include/llvm/System/Path.h Tue Nov  9 09:10:45 2010
@@ -89,7 +89,7 @@
       /// 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();

Modified: llvm/trunk/lib/System/Win32/Path.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Win32/Path.inc?rev=118502&r1=118501&r2=118502&view=diff
==============================================================================
--- llvm/trunk/lib/System/Win32/Path.inc (original)
+++ llvm/trunk/lib/System/Win32/Path.inc Tue Nov  9 09:10:45 2010
@@ -233,9 +233,9 @@
 // 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





More information about the llvm-commits mailing list