diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-11 18:58:47 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-11 18:58:47 +0000 |
commit | 40de55a5569bd175cee6abab2070fa0edfbd8658 (patch) | |
tree | 1e2d766509b07e4d75bcba628a3b1f116c2ef70d /lib | |
parent | add4c2fbb1c5038337146a04e48d66a3d8bafa6b (diff) | |
download | external_llvm-40de55a5569bd175cee6abab2070fa0edfbd8658.zip external_llvm-40de55a5569bd175cee6abab2070fa0edfbd8658.tar.gz external_llvm-40de55a5569bd175cee6abab2070fa0edfbd8658.tar.bz2 |
Remove GetSystemLibraryPaths.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183770 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Support/Path.cpp | 19 | ||||
-rw-r--r-- | lib/Support/Unix/Path.inc | 15 | ||||
-rw-r--r-- | lib/Support/Windows/Path.inc | 30 |
3 files changed, 0 insertions, 64 deletions
diff --git a/lib/Support/Path.cpp b/lib/Support/Path.cpp index 5c2b1f7..09d2ead 100644 --- a/lib/Support/Path.cpp +++ b/lib/Support/Path.cpp @@ -95,25 +95,6 @@ bool Path::hasMagicNumber(StringRef Magic) const { return false; } -static void getPathList(const char*path, std::vector<Path>& Paths) { - const char* at = path; - const char* delim = strchr(at, PathSeparator); - Path tmpPath; - while (delim != 0) { - std::string tmp(at, size_t(delim-at)); - if (tmpPath.set(tmp)) - if (tmpPath.canRead()) - Paths.push_back(tmpPath); - at = delim + 1; - delim = strchr(at, PathSeparator); - } - - if (*at != 0) - if (tmpPath.set(std::string(at))) - if (tmpPath.canRead()) - Paths.push_back(tmpPath); -} - static StringRef getDirnameCharSep(StringRef path, const char *Sep) { assert(Sep[0] != '\0' && Sep[1] == '\0' && "Sep must be a 1-character string literal."); diff --git a/lib/Support/Unix/Path.inc b/lib/Support/Unix/Path.inc index 3ca4a0d..b942674 100644 --- a/lib/Support/Unix/Path.inc +++ b/lib/Support/Unix/Path.inc @@ -207,21 +207,6 @@ Path::GetTemporaryDirectory(std::string *ErrMsg) { #endif } -void -Path::GetSystemLibraryPaths(std::vector<sys::Path>& Paths) { -#ifdef LTDL_SHLIBPATH_VAR - char* env_var = getenv(LTDL_SHLIBPATH_VAR); - if (env_var != 0) { - getPathList(env_var,Paths); - } -#endif - // FIXME: Should this look at LD_LIBRARY_PATH too? - Paths.push_back(sys::Path("/usr/local/lib/")); - Paths.push_back(sys::Path("/usr/X11R6/lib/")); - Paths.push_back(sys::Path("/usr/lib/")); - Paths.push_back(sys::Path("/lib/")); -} - Path Path::GetUserHomeDirectory() { const char* home = getenv("HOME"); diff --git a/lib/Support/Windows/Path.inc b/lib/Support/Windows/Path.inc index c29b28a..f076cd4 100644 --- a/lib/Support/Windows/Path.inc +++ b/lib/Support/Windows/Path.inc @@ -241,36 +241,6 @@ Path::GetRootDirectory() { return Path("file:///"); } -void -Path::GetSystemLibraryPaths(std::vector<sys::Path>& Paths) { - char buff[MAX_PATH]; - // Generic form of C:\Windows\System32 - HRESULT res = SHGetFolderPathA(NULL, - CSIDL_FLAG_CREATE | CSIDL_SYSTEM, - NULL, - SHGFP_TYPE_CURRENT, - buff); - if (res != S_OK) { - assert(0 && "Failed to get system directory"); - return; - } - Paths.push_back(sys::Path(buff)); - - // Reset buff. - buff[0] = 0; - // Generic form of C:\Windows - res = SHGetFolderPathA(NULL, - CSIDL_FLAG_CREATE | CSIDL_WINDOWS, - NULL, - SHGFP_TYPE_CURRENT, - buff); - if (res != S_OK) { - assert(0 && "Failed to get windows directory"); - return; - } - Paths.push_back(sys::Path(buff)); -} - Path Path::GetUserHomeDirectory() { char buff[MAX_PATH]; |