Remove GetUserHomeDirectory.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 11 Jun 2013 19:08:15 +0000 (19:08 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 11 Jun 2013 19:08:15 +0000 (19:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183773 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/PathV1.h
lib/Support/Unix/Path.inc
lib/Support/Windows/Path.inc

index 44c29ec7fd1f7fc94fa22b0f2f28c57df24ecab2..fe47a09d742b0fcae8e2f9193a47ea15f314268b 100644 (file)
@@ -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.
index b942674d91af453a29c14bc9484c08f321e00063..ab9157be99facc69ccc48bc578ac67bf626f96b4 100644 (file)
@@ -207,16 +207,6 @@ Path::GetTemporaryDirectory(std::string *ErrMsg) {
 #endif
 }
 
-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];
index f076cd402abf60f0176394c776b35fad459dfb91..1de75487b6c27acba6f23bce44ebaf8a9f1e6443 100644 (file)
@@ -241,19 +241,6 @@ Path::GetRootDirectory() {
   return Path("file:///");
 }
 
-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];