[PATCH] D117619: [DebugInfod] Prefix debuginfod cache directory.

Daniel Thornburgh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 18 15:32:04 PST 2022


mysterymath created this revision.
mysterymath added a reviewer: phosek.
Herald added a subscriber: hiraditya.
mysterymath requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This prevents the debuginfod client from dumping files directly into the
default cache directory (e.g., ~/.cache). Instead, these files are
placed in a subdirectory (e.g., ~/.cache/llvm-debuginfod/client).
Behavior is unaffected if the cache directory is provided by the
DEBUGINFO_CACHE_PATH environment variable.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D117619

Files:
  llvm/lib/Debuginfod/Debuginfod.cpp


Index: llvm/lib/Debuginfod/Debuginfod.cpp
===================================================================
--- llvm/lib/Debuginfod/Debuginfod.cpp
+++ llvm/lib/Debuginfod/Debuginfod.cpp
@@ -52,6 +52,7 @@
   if (!sys::path::cache_directory(CacheDirectory))
     return createStringError(
         errc::io_error, "Unable to determine appropriate cache directory.");
+  sys::path::append(CacheDirectory, "llvm-debuginfod", "client");
   return std::string(CacheDirectory);
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117619.401013.patch
Type: text/x-patch
Size: 478 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220118/2cb0d374/attachment.bin>


More information about the llvm-commits mailing list