[PATCH] D117589: [Support] [DebugInfo] Lazily create cache dir.

Daniel Thornburgh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 18 10:53:52 PST 2022


mysterymath created this revision.
mysterymath added reviewers: phosek, MaskRay, tejohnson.
Herald added subscribers: ormris, dexonsmith, steven_wu, hiraditya.
mysterymath requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This change defers creating Support/Caching.cpp's cache directory until
it actually writes to the cache.

This allows using Caching library in a read-only fashion. If read-only,
the cache is guaranteed not to write to disk. This keeps tools using
DebugInfod (currently llvm-symbolizer) hermetic when not configured to
perform remote lookups.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D117589

Files:
  llvm/include/llvm/Support/Caching.h
  llvm/lib/Support/Caching.cpp
  llvm/test/ThinLTO/X86/cache.ll
  llvm/test/ThinLTO/X86/empty_module_with_cache.ll
  llvm/unittests/Debuginfod/DebuginfodTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117589.400916.patch
Type: text/x-patch
Size: 6144 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220118/b87a32ef/attachment.bin>


More information about the llvm-commits mailing list