From 9e590024f61e68df2bc494513bf6b893ce5b6f30 Mon Sep 17 00:00:00 2001 From: "Michael J. Spencer" Date: Mon, 27 Dec 2010 03:21:41 +0000 Subject: Support/PathV1: Deprecate GetRootDirectory. llvm-svn: 122580 --- llvm/lib/Support/Unix/Path.inc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'llvm/lib/Support') 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 -- cgit v1.2.3