summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2012-02-29 00:20:37 +0000
committerDaniel Dunbar <daniel@zuster.org>2012-02-29 00:20:37 +0000
commitb23158c3b711ba34bee79b9d6fb779dba865b815 (patch)
tree0e7efab2382a7a5354168e4fe60c9dc3a61bf6c6 /llvm/lib
parentbeb342539cd3a18fd15633e2740a298326b5e7e8 (diff)
downloadbcm5719-llvm-b23158c3b711ba34bee79b9d6fb779dba865b815.tar.gz
bcm5719-llvm-b23158c3b711ba34bee79b9d6fb779dba865b815.zip
Support/PathV2: Fix make_absolute() to match is_absolute() and not expect to
find root names on Unix. - This fixes make_absolute to not basically always call current_path() on Unix systems. - I think the API probably needs cleanup in this area, but I'll let Michael handle that. llvm-svn: 151681
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Support/PathV2.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/Support/PathV2.cpp b/llvm/lib/Support/PathV2.cpp
index bf8672bc57b..ce97b7f2ca2 100644
--- a/llvm/lib/Support/PathV2.cpp
+++ b/llvm/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)
OpenPOWER on IntegriCloud