clang  12.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

 DependencyScanningFilesystemSharedCache ()
 
SharedFileSystemEntryget (StringRef Key)
 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 is sharded based on the hash of the key to reduce the lock contention for the worker threads.

Definition at line 110 of file DependencyScanningFilesystem.h.

Constructor & Destructor Documentation

◆ DependencyScanningFilesystemSharedCache()

DependencyScanningFilesystemSharedCache::DependencyScanningFilesystemSharedCache ( )

Definition at line 103 of file DependencyScanningFilesystem.cpp.

References max().

Member Function Documentation

◆ get()

DependencyScanningFilesystemSharedCache::SharedFileSystemEntry & DependencyScanningFilesystemSharedCache::get ( StringRef  Key)

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 119 of file DependencyScanningFilesystem.cpp.

References clang::hash_value().


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