From df929cf8dfe8968b111262569644d46aa4b533c3 Mon Sep 17 00:00:00 2001 From: "Michael J. Spencer" Date: Tue, 9 Nov 2010 15:10:45 +0000 Subject: [PATCH] System/Path/Windows: Change GetRootDirectory to return file:/// instead of C:/. llvm-svn: 118502 --- llvm/include/llvm/System/Path.h | 2 +- llvm/lib/System/Win32/Path.inc | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/llvm/include/llvm/System/Path.h b/llvm/include/llvm/System/Path.h index a3b9ccc1f0a2..ca1be63bbbf5 100644 --- a/llvm/include/llvm/System/Path.h +++ b/llvm/include/llvm/System/Path.h @@ -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(); diff --git a/llvm/lib/System/Win32/Path.inc b/llvm/lib/System/Win32/Path.inc index 8e3004d0ac41..75f6b7134a48 100644 --- a/llvm/lib/System/Win32/Path.inc +++ b/llvm/lib/System/Win32/Path.inc @@ -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