diff options
author | Pawel Bylica <chfast@gmail.com> | 2015-11-02 14:57:24 +0000 |
---|---|---|
committer | Pawel Bylica <chfast@gmail.com> | 2015-11-02 14:57:24 +0000 |
commit | 7c1f36a6b7503d1aa5d5e696fb1fe78628cab5d2 (patch) | |
tree | 4cc624abf3175d763c50f3568ee56bd89006fde9 | |
parent | e3c0534b112ecb67bcc6ba7d1a00c30492ed3673 (diff) | |
download | bcm5719-llvm-7c1f36a6b7503d1aa5d5e696fb1fe78628cab5d2.tar.gz bcm5719-llvm-7c1f36a6b7503d1aa5d5e696fb1fe78628cab5d2.zip |
Use static instead of anonymous namespace for helper functions. NFC.
llvm-svn: 251801
-rw-r--r-- | llvm/lib/Support/Unix/Path.inc | 7 | ||||
-rw-r--r-- | llvm/lib/Support/Windows/Path.inc | 6 |
2 files changed, 4 insertions, 9 deletions
diff --git a/llvm/lib/Support/Unix/Path.inc b/llvm/lib/Support/Unix/Path.inc index e79abcb0fcb..d85c37ab3bf 100644 --- a/llvm/lib/Support/Unix/Path.inc +++ b/llvm/lib/Support/Unix/Path.inc @@ -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 diff --git a/llvm/lib/Support/Windows/Path.inc b/llvm/lib/Support/Windows/Path.inc index 4167865b65f..49910af55a7 100644 --- a/llvm/lib/Support/Windows/Path.inc +++ b/llvm/lib/Support/Windows/Path.inc @@ -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); |