X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=lib%2FSupport%2FWindows%2FPath.inc;h=49910af55a79490e43f3b72fcc64b224fa5d9354;hp=30f0bb8204c64b1aa20200cfd7ada7af39e3a218;hb=6bd362c2d9d3e3284708ba5e55d8f3ccf7493313;hpb=44bf343ec1420b3505aab17c7953d5f68263dee1 diff --git a/lib/Support/Windows/Path.inc b/lib/Support/Windows/Path.inc index 30f0bb8204c..49910af55a7 100644 --- a/lib/Support/Windows/Path.inc +++ b/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 &result) { +static bool getKnownFolderPath(KNOWNFOLDERID folderId, + SmallVectorImpl &result) { wchar_t *path = nullptr; if (::SHGetKnownFolderPath(folderId, KF_FLAG_CREATE, nullptr, &path) != S_OK) return false; @@ -765,6 +764,9 @@ bool getKnownFolderPath(KNOWNFOLDERID folderId, SmallVectorImpl &result) { ::CoTaskMemFree(path); return ok; } + +bool getUserCacheDir(SmallVectorImpl &Result) { + return getKnownFolderPath(FOLDERID_LocalAppData, Result); } bool home_directory(SmallVectorImpl &result) {