clang
23.0.0git
include
clang
DependencyScanning
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
12
#include "
clang/Serialization/ModuleCache.h
"
13
#include "llvm/ADT/StringMap.h"
14
15
#include <atomic>
16
#include <mutex>
17
#include <shared_mutex>
18
19
namespace
clang
{
20
namespace
dependencies
{
21
22
struct
ModuleCacheEntry
{
23
std::shared_mutex
CompilationMutex
;
24
std::atomic<std::time_t>
Timestamp
= 0;
25
};
26
27
struct
ModuleCacheEntries
{
28
std::mutex
Mutex
;
29
llvm::StringMap<std::unique_ptr<ModuleCacheEntry>>
Map
;
30
};
31
32
std::shared_ptr<ModuleCache>
33
makeInProcessModuleCache
(
ModuleCacheEntries
&Entries);
34
35
}
// namespace dependencies
36
}
// namespace clang
37
38
#endif
// LLVM_CLANG_DEPENDENCYSCANNING_INPROCESSMODULECACHE_H
ModuleCache.h
clang::dependencies
Definition
DependencyScannerImpl.h:25
clang::dependencies::makeInProcessModuleCache
std::shared_ptr< ModuleCache > makeInProcessModuleCache(ModuleCacheEntries &Entries)
Definition
InProcessModuleCache.cpp:117
clang
The JSON file list parser is used to communicate input to InstallAPI.
Definition
CalledOnceCheck.h:17
clang::dependencies::ModuleCacheEntries
Definition
InProcessModuleCache.h:27
clang::dependencies::ModuleCacheEntries::Map
llvm::StringMap< std::unique_ptr< ModuleCacheEntry > > Map
Definition
InProcessModuleCache.h:29
clang::dependencies::ModuleCacheEntries::Mutex
std::mutex Mutex
Definition
InProcessModuleCache.h:28
clang::dependencies::ModuleCacheEntry
Definition
InProcessModuleCache.h:22
clang::dependencies::ModuleCacheEntry::Timestamp
std::atomic< std::time_t > Timestamp
Definition
InProcessModuleCache.h:24
clang::dependencies::ModuleCacheEntry::CompilationMutex
std::shared_mutex CompilationMutex
Definition
InProcessModuleCache.h:23
Generated on
for clang by
1.14.0