diff options
Diffstat (limited to 'lib/Support/PathV2.cpp')
-rw-r--r-- | lib/Support/PathV2.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Support/PathV2.cpp b/lib/Support/PathV2.cpp index bf8672bc57..ce97b7f2ca 100644 --- a/lib/Support/PathV2.cpp +++ b/lib/Support/PathV2.cpp @@ -600,8 +600,12 @@ namespace fs { error_code make_absolute(SmallVectorImpl<char> &path) { StringRef p(path.data(), path.size()); - bool rootName = path::has_root_name(p), - rootDirectory = path::has_root_directory(p); + bool rootDirectory = path::has_root_directory(p), +#ifdef LLVM_ON_WIN32 + rootName = has_root_name(p); +#else + rootName = true; +#endif // Already absolute. if (rootName && rootDirectory) |