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 | |
| parent | 8fc59a682fa1cc097fcaa13dc9f3721fa8f34877 (diff) | |
| download | bcm5719-llvm-9e590024f61e68df2bc494513bf6b893ce5b6f30.tar.gz bcm5719-llvm-9e590024f61e68df2bc494513bf6b893ce5b6f30.zip | |
Support/PathV1: Deprecate GetRootDirectory.
llvm-svn: 122580
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/Support/PathV1.h | 3 | ||||
| -rw-r--r-- | llvm/lib/Support/Unix/Path.inc | 11 |
2 files changed, 7 insertions, 7 deletions
diff --git a/llvm/include/llvm/Support/PathV1.h b/llvm/include/llvm/Support/PathV1.h index a22c40f51b3..fdf9084b5b3 100644 --- a/llvm/include/llvm/Support/PathV1.h +++ b/llvm/include/llvm/Support/PathV1.h @@ -98,7 +98,8 @@ namespace sys { /// it is file:///. Other operating systems may have different notions of /// what the root directory is or none at all. In that case, a consistent /// default root directory will be used. - static Path GetRootDirectory(); + LLVM_ATTRIBUTE_DEPRECATED(static Path GetRootDirectory(), + LLVMV_PATH_DEPRECATED_MSG(NOTHING)); /// Construct a path to a unique temporary directory that is created in /// a "standard" place for the operating system. The directory is diff --git a/llvm/lib/Support/Unix/Path.inc b/llvm/lib/Support/Unix/Path.inc index b21245c8207..886ba6bf6d4 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 |

