clang  14.0.0git
Classes | Public Member Functions | List of all members
clang::tooling::dependencies::DependencyScanningFilesystemSharedCache Class Reference

This class is a shared cache, that caches the 'stat' and 'open' calls to the underlying real file system. More...

#include "clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h"

Classes

struct  SharedFileSystemEntry
 

Public Member Functions

SharedFileSystemEntryget (StringRef Key, bool Minimized)
 Returns a cache entry for the corresponding key. More...
 

Detailed Description

This class is a shared cache, that caches the 'stat' and 'open' calls to the underlying real file system.

It distinguishes between minimized and original files.

It is sharded based on the hash of the key to reduce the lock contention for the worker threads.

Definition at line 111 of file DependencyScanningFilesystem.h.

Member Function Documentation

◆ get()

DependencyScanningFilesystemSharedCache::SharedFileSystemEntry & DependencyScanningFilesystemSharedCache::get ( StringRef  Key,
bool  Minimized 
)

Returns a cache entry for the corresponding key.

A new cache entry is created if the key is not in the cache. This is a thread safe call.

Definition at line 122 of file DependencyScanningFilesystem.cpp.

References clang::TypePropertyCache< Private >::get().


The documentation for this class was generated from the following files: