1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00

Use static instead of anonymous namespace for helper functions. NFC.

llvm-svn: 251801
This commit is contained in:
Pawel Bylica 2015-11-02 14:57:24 +00:00
parent ab8c77a47d
commit 51296e1676
2 changed files with 4 additions and 9 deletions

View File

@ -560,8 +560,7 @@ bool home_directory(SmallVectorImpl<char> &result) {
return false;
}
namespace {
bool getDarwinConfDir(bool TempDir, SmallVectorImpl<char> &Result) {
static bool getDarwinConfDir(bool TempDir, SmallVectorImpl<char> &Result) {
#if defined(_CS_DARWIN_USER_TEMP_DIR) && defined(_CS_DARWIN_USER_CACHE_DIR)
// On Darwin, use DARWIN_USER_TEMP_DIR or DARWIN_USER_CACHE_DIR.
// macros defined in <unistd.h> on darwin >= 9
@ -586,7 +585,7 @@ bool getDarwinConfDir(bool TempDir, SmallVectorImpl<char> &Result) {
return false;
}
bool getUserCacheDir(SmallVectorImpl<char> &Result) {
static bool getUserCacheDir(SmallVectorImpl<char> &Result) {
// First try using XDS_CACHE_HOME env variable,
// as specified in XDG Base Directory Specification at
// http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
@ -608,8 +607,6 @@ bool getUserCacheDir(SmallVectorImpl<char> &Result) {
return false;
}
}
static const char *getEnvTempDir() {
// Check whether the temporary directory is specified by an environment

View File

@ -754,9 +754,8 @@ std::error_code openFileForWrite(const Twine &Name, int &ResultFD,
} // end namespace fs
namespace path {
namespace {
bool getKnownFolderPath(KNOWNFOLDERID folderId, SmallVectorImpl<char> &result) {
static bool getKnownFolderPath(KNOWNFOLDERID folderId,
SmallVectorImpl<char> &result) {
wchar_t *path = nullptr;
if (::SHGetKnownFolderPath(folderId, KF_FLAG_CREATE, nullptr, &path) != S_OK)
return false;
@ -769,7 +768,6 @@ bool getKnownFolderPath(KNOWNFOLDERID folderId, SmallVectorImpl<char> &result) {
bool getUserCacheDir(SmallVectorImpl<char> &Result) {
return getKnownFolderPath(FOLDERID_LocalAppData, Result);
}
}
bool home_directory(SmallVectorImpl<char> &result) {
return getKnownFolderPath(FOLDERID_Profile, result);