aboutsummaryrefslogtreecommitdiffstats
path: root/lib/System/Win32
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-02-27 06:17:10 +0000
committerChris Lattner <sabre@nondot.org>2008-02-27 06:17:10 +0000
commite1b332a30459a726e882a4f484a9a31f2cea9e29 (patch)
treea8c682ec5e545f6b8bb6de9876338a63b06b164b /lib/System/Win32
parentb09916bdfbd7ffdc8fbadb5ee0c0b50567823f46 (diff)
downloadexternal_llvm-e1b332a30459a726e882a4f484a9a31f2cea9e29.zip
external_llvm-e1b332a30459a726e882a4f484a9a31f2cea9e29.tar.gz
external_llvm-e1b332a30459a726e882a4f484a9a31f2cea9e29.tar.bz2
Add path separator support, patch by Sam Bishop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47662 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/Win32')
-rw-r--r--lib/System/Win32/Path.inc21
1 files changed, 2 insertions, 19 deletions
diff --git a/lib/System/Win32/Path.inc b/lib/System/Win32/Path.inc
index ff5cc0a..ee3f622 100644
--- a/lib/System/Win32/Path.inc
+++ b/lib/System/Win32/Path.inc
@@ -45,6 +45,8 @@ static void FlipBackSlashes(std::string& s) {
namespace llvm {
namespace sys {
+extern const char sys::PathSeparator = ';';
+
bool
Path::isValid() const {
if (path.empty())
@@ -164,25 +166,6 @@ Path::GetRootDirectory() {
return result;
}
-static void getPathList(const char*path, std::vector<sys::Path>& Paths) {
- const char* at = path;
- const char* delim = strchr(at, ';');
- Path tmpPath;
- while (delim != 0) {
- std::string tmp(at, size_t(delim-at));
- if (tmpPath.set(tmp))
- if (tmpPath.canRead())
- Paths.push_back(tmpPath);
- at = delim + 1;
- delim = strchr(at, ';');
- }
-
- if (*at != 0)
- if (tmpPath.set(std::string(at)))
- if (tmpPath.canRead())
- Paths.push_back(tmpPath);
-}
-
void
Path::GetSystemLibraryPaths(std::vector<sys::Path>& Paths) {
Paths.push_back(sys::Path("C:/WINDOWS/SYSTEM32"));