clang 23.0.0git
InProcessModuleCache.h
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_CLANG_DEPENDENCYSCANNING_INPROCESSMODULECACHE_H
10#define LLVM_CLANG_DEPENDENCYSCANNING_INPROCESSMODULECACHE_H
11
13#include "llvm/ADT/StringMap.h"
14
15#include <atomic>
16#include <condition_variable>
17#include <mutex>
18
19namespace clang {
20namespace dependencies {
21
23 std::mutex Mutex;
24 std::condition_variable CondVar;
25 bool Locked = false;
26 unsigned Generation = 0;
27
28 std::atomic<std::time_t> Timestamp = 0;
29};
30
32 std::mutex Mutex;
33 llvm::StringMap<std::unique_ptr<ModuleCacheEntry>> Map;
34};
35
36std::shared_ptr<ModuleCache>
38
39} // namespace dependencies
40} // namespace clang
41
42#endif // LLVM_CLANG_DEPENDENCYSCANNING_INPROCESSMODULECACHE_H
std::shared_ptr< ModuleCache > makeInProcessModuleCache(ModuleCacheEntries &Entries)
The JSON file list parser is used to communicate input to InstallAPI.
llvm::StringMap< std::unique_ptr< ModuleCacheEntry > > Map