9#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_SUPPORT_FILECACHE_H
10#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_SUPPORT_FILECACHE_H
14#include "llvm/Support/Chrono.h"
59 std::chrono::steady_clock::time_point FreshTime,
60 llvm::function_ref<
void(std::optional<llvm::StringRef>)> Parse,
61 llvm::function_ref<
void()>
Read)
const;
69 mutable std::mutex Mu;
71 mutable std::chrono::steady_clock::time_point ValidTime;
73 mutable llvm::sys::TimePoint<> ModifiedTime;
74 mutable uint64_t Size;
Base class for threadsafe cache of data read from a file on disk.
void read(const ThreadsafeFS &TFS, std::chrono::steady_clock::time_point FreshTime, llvm::function_ref< void(std::optional< llvm::StringRef >)> Parse, llvm::function_ref< void()> Read) const
Wrapper for vfs::FileSystem for use in multithreaded programs like clangd.
std::string Path
A typedef to represent a file path.
llvm::StringRef PathRef
A typedef to represent a ref to file path.
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//