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

Daniel Thornburgh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 19 11:15:20 PST 2022


mysterymath added inline comments.


================
Comment at: llvm/lib/Support/Caching.cpp:154
+      Error Err = Error::success();
+      static CacheDir Dir(CacheDirectoryPath, &Err);
+      if (Err)
----------------
phosek wrote:
> Do you think we could avoid `static` and call `sys::fs::create_directories(Path, /*IgnoreExisting=*/true)` unconditionally?
Yeah, looking at this with fresh eyes, the attempt to avoid a syscall here is a premature optimization. Removed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117589/new/

https://reviews.llvm.org/D117589



More information about the llvm-commits mailing list