diff options
| author | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-12-27 03:21:41 +0000 |
|---|---|---|
| committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-12-27 03:21:41 +0000 |
| commit | 9e590024f61e68df2bc494513bf6b893ce5b6f30 (patch) | |
| tree | 0490fd28fcdf6dc9de656737d46435fd129905a8 /llvm/lib/Support/Unix/Path.inc | |
| parent | 8fc59a682fa1cc097fcaa13dc9f3721fa8f34877 (diff) | |
| download | llvm-9e590024f61e68df2bc494513bf6b893ce5b6f30.zip llvm-9e590024f61e68df2bc494513bf6b893ce5b6f30.tar.gz llvm-9e590024f61e68df2bc494513bf6b893ce5b6f30.tar.bz2 | |
Support/PathV1: Deprecate GetRootDirectory.
llvm-svn: 122580
Diffstat (limited to 'llvm/lib/Support/Unix/Path.inc')
| -rw-r--r-- | llvm/lib/Support/Unix/Path.inc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/Support/Unix/Path.inc b/llvm/lib/Support/Unix/Path.inc index b21245c..886ba6b 100644 --- a/llvm/lib/Support/Unix/Path.inc +++ b/llvm/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 |
