[all-commits] [llvm/llvm-project] 6b92bb: [Support] [DebugInfo] Lazily create cache dir.

Daniel Thornburgh via All-commits all-commits at lists.llvm.org
Thu Jan 20 11:27:31 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6b92bb47901f3a2d4a9aa683b0365088113a729e
      https://github.com/llvm/llvm-project/commit/6b92bb47901f3a2d4a9aa683b0365088113a729e
  Author: Daniel Thornburgh <dthorn at google.com>
  Date:   2022-01-20 (Thu, 20 Jan 2022)

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

  Log Message:
  -----------
  [Support] [DebugInfo] Lazily create cache dir.

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.

Reviewed By: phosek

Differential Revision: https://reviews.llvm.org/D117589




More information about the All-commits mailing list