diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-11 19:08:15 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-11 19:08:15 +0000 |
| commit | 8b86c6c509b53448c6d01f2be0da6507dbd2ad01 (patch) | |
| tree | 34c9caa6ef6130c6d84dd17f381c6a1b387edcdc | |
| parent | 8d6e5ec29231b4003e09746ea08d19b853de36cf (diff) | |
| download | bcm5719-llvm-8b86c6c509b53448c6d01f2be0da6507dbd2ad01.tar.gz bcm5719-llvm-8b86c6c509b53448c6d01f2be0da6507dbd2ad01.zip | |
Remove GetUserHomeDirectory.
llvm-svn: 183773
| -rw-r--r-- | llvm/include/llvm/Support/PathV1.h | 9 | ||||
| -rw-r--r-- | llvm/lib/Support/Unix/Path.inc | 10 | ||||
| -rw-r--r-- | llvm/lib/Support/Windows/Path.inc | 13 |
3 files changed, 0 insertions, 32 deletions
diff --git a/llvm/include/llvm/Support/PathV1.h b/llvm/include/llvm/Support/PathV1.h index 44c29ec7fd1..fe47a09d742 100644 --- a/llvm/include/llvm/Support/PathV1.h +++ b/llvm/include/llvm/Support/PathV1.h @@ -111,15 +111,6 @@ namespace sys { /// directory. static Path GetTemporaryDirectory(std::string* ErrMsg = 0); - /// Construct a path to the current user's home directory. The - /// implementation must use an operating system specific mechanism for - /// determining the user's home directory. For example, the environment - /// variable "HOME" could be used on Unix. If a given operating system - /// does not have the concept of a user's home directory, this static - /// constructor must provide the same result as GetRootDirectory. - /// @brief Construct a path to the current user's "home" directory - static Path GetUserHomeDirectory(); - /// Construct a path to the current directory for the current process. /// @returns The current working directory. /// @brief Returns the current working directory. diff --git a/llvm/lib/Support/Unix/Path.inc b/llvm/lib/Support/Unix/Path.inc index b942674d91a..ab9157be99f 100644 --- a/llvm/lib/Support/Unix/Path.inc +++ b/llvm/lib/Support/Unix/Path.inc @@ -208,16 +208,6 @@ Path::GetTemporaryDirectory(std::string *ErrMsg) { } Path -Path::GetUserHomeDirectory() { - const char* home = getenv("HOME"); - Path result; - if (home && result.set(home)) - return result; - result.set("/"); - return result; -} - -Path Path::GetCurrentDirectory() { char pathname[MAXPATHLEN]; if (!getcwd(pathname, MAXPATHLEN)) { diff --git a/llvm/lib/Support/Windows/Path.inc b/llvm/lib/Support/Windows/Path.inc index f076cd402ab..1de75487b6c 100644 --- a/llvm/lib/Support/Windows/Path.inc +++ b/llvm/lib/Support/Windows/Path.inc @@ -242,19 +242,6 @@ Path::GetRootDirectory() { } Path -Path::GetUserHomeDirectory() { - char buff[MAX_PATH]; - HRESULT res = SHGetFolderPathA(NULL, - CSIDL_FLAG_CREATE | CSIDL_APPDATA, - NULL, - SHGFP_TYPE_CURRENT, - buff); - if (res != S_OK) - assert(0 && "Failed to get user home directory"); - return Path(buff); -} - -Path Path::GetCurrentDirectory() { char pathname[MAX_PATH]; ::GetCurrentDirectoryA(MAX_PATH,pathname); |

