[llvm] fd0782a - [DebugInfod] Prefix debuginfod cache directory
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 19 10:09:09 PST 2022
Author: Petr Hosek
Date: 2022-01-19T10:09:00-08:00
New Revision: fd0782a37bbf7dd4ece721df92c703a381595661
URL: https://github.com/llvm/llvm-project/commit/fd0782a37bbf7dd4ece721df92c703a381595661
DIFF: https://github.com/llvm/llvm-project/commit/fd0782a37bbf7dd4ece721df92c703a381595661.diff
LOG: [DebugInfod] Prefix debuginfod cache directory
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.
Patch By: mysterymath
Differential Revision: https://reviews.llvm.org/D117619
Added:
Modified:
llvm/lib/Debuginfod/Debuginfod.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Debuginfod/Debuginfod.cpp b/llvm/lib/Debuginfod/Debuginfod.cpp
index 48d0e4d1b763..debee6e52b72 100644
--- a/llvm/lib/Debuginfod/Debuginfod.cpp
+++ b/llvm/lib/Debuginfod/Debuginfod.cpp
@@ -52,6 +52,7 @@ Expected<std::string> getDefaultDebuginfodCacheDirectory() {
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);
}
More information about the llvm-commits
mailing list