Support/PathV1: Deprecate GetRootDirectory.

llvm-svn: 122580
This commit is contained in:
Michael J. Spencer 2010-12-27 03:21:41 +00:00
parent 8fc59a682f
commit 9e590024f6
2 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -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