//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_DEPENDENCYSCANNING_INPROCESSMODULECACHE_H #define LLVM_CLANG_DEPENDENCYSCANNING_INPROCESSMODULECACHE_H #include "clang/Serialization/ModuleCache.h" #include "llvm/ADT/StringMap.h" #include #include #include namespace clang { namespace dependencies { struct ModuleCacheEntry { std::shared_mutex CompilationMutex; std::atomic Timestamp = 0; }; struct ModuleCacheEntries { std::mutex Mutex; llvm::StringMap> Map; }; std::shared_ptr makeInProcessModuleCache(ModuleCacheEntries &Entries); } // namespace dependencies } // namespace clang #endif // LLVM_CLANG_DEPENDENCYSCANNING_INPROCESSMODULECACHE_H