[PATCH] D13801: [Support] Extend sys::path with user_cache_directory function.

Aaron Ballman via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 16 05:56:25 PDT 2015


aaron.ballman added a subscriber: aaron.ballman.
aaron.ballman added reviewers: aaron.ballman, chapuni.

================
Comment at: include/llvm/Support/Path.h:328
@@ -327,1 +327,3 @@
 
+/// Get the user's cache directory.
+///
----------------
Should we be using @brief here like the rest of the file?

================
Comment at: lib/Support/Unix/Path.inc:592
@@ +591,3 @@
+
+  /// First try using XDS_CACHE_HOME env variable,
+  /// as specified in XDG Base Directory Specification at
----------------
Please use /// only for doxygen comments, // otherwise.

================
Comment at: lib/Support/Windows/Path.inc:773
@@ +772,3 @@
+bool user_cache_directory(SmallVectorImpl<char> &result) {
+  return getKnownFolderPath(FOLDERID_LocalAppData, result);
+}
----------------
How is this intended to be used? Is the caller expected to place a directory under the user_cache_directory() and use that, or are they expecting this to be a folder where they can dump cached data? I ask because putting files directly into the local AppData directory is not a particularly good thing to do on Windows.


http://reviews.llvm.org/D13801





More information about the llvm-commits mailing list