aboutsummaryrefslogtreecommitdiff
path: root/lib/Support/Unix/Path.inc
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2010-12-27 03:21:41 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2010-12-27 03:21:41 +0000
commit9170a0f02d1ed521dd6583661e17581f9b7102ec (patch)
tree68a7546bde0b07c5ea87488b6855bb3f4649fc6a /lib/Support/Unix/Path.inc
parentc3a561cb8ed6f04e3cf7b1ff38c9f51a695d196d (diff)
Support/PathV1: Deprecate GetRootDirectory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122580 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Unix/Path.inc')
-rw-r--r--lib/Support/Unix/Path.inc11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Support/Unix/Path.inc b/lib/Support/Unix/Path.inc
index b21245c820..886ba6bf6d 100644
--- a/lib/Support/Unix/Path.inc
+++ b/lib/Support/Unix/Path.inc
@@ -242,12 +242,11 @@ Path::GetLLVMDefaultConfigDir() {
Path
Path::GetUserHomeDirectory() {
const char* home = getenv("HOME");
- if (home) {
- Path result;
- if (result.set(home))
- return result;
- }
- return GetRootDirectory();
+ Path result;
+ if (home && result.set(home))
+ return result;
+ result.set("/");
+ return result;
}
Path