git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122580
91177308-0d34-0410-b5e6-
96231b3b80d8
/// 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
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