clang 20.0.0git
Public Member Functions | Public Attributes | List of all members
clang::tooling::dependencies::CachedFileContents Struct Reference

Contents and directive tokens of a cached file entry. More...

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

Public Member Functions

 CachedFileContents (std::unique_ptr< llvm::MemoryBuffer > Contents)
 
 ~CachedFileContents ()
 

Public Attributes

std::unique_ptr< llvm::MemoryBuffer > Original
 Owning storage for the original contents.
 
std::mutex ValueLock
 The mutex that must be locked before mutating directive tokens.
 
SmallVector< dependency_directives_scan::Token, 10 > DepDirectiveTokens
 
std::atomic< const std::optional< DependencyDirectivesTy > * > DepDirectives
 Accessor to the directive tokens that's atomic to avoid data races.
 

Detailed Description

Contents and directive tokens of a cached file entry.

Single instance can be shared between multiple entries.

Definition at line 31 of file DependencyScanningFilesystem.h.

Constructor & Destructor Documentation

◆ CachedFileContents()

clang::tooling::dependencies::CachedFileContents::CachedFileContents ( std::unique_ptr< llvm::MemoryBuffer >  Contents)
inline

Definition at line 32 of file DependencyScanningFilesystem.h.

◆ ~CachedFileContents()

clang::tooling::dependencies::CachedFileContents::~CachedFileContents ( )
inline

Definition at line 45 of file DependencyScanningFilesystem.h.

References DepDirectives.

Member Data Documentation

◆ DepDirectives

std::atomic<const std::optional<DependencyDirectivesTy> *> clang::tooling::dependencies::CachedFileContents::DepDirectives

◆ DepDirectiveTokens

SmallVector<dependency_directives_scan::Token, 10> clang::tooling::dependencies::CachedFileContents::DepDirectiveTokens

◆ Original

std::unique_ptr<llvm::MemoryBuffer> clang::tooling::dependencies::CachedFileContents::Original

◆ ValueLock

std::mutex clang::tooling::dependencies::CachedFileContents::ValueLock

The mutex that must be locked before mutating directive tokens.

Definition at line 39 of file DependencyScanningFilesystem.h.

Referenced by clang::tooling::dependencies::DependencyScanningWorkerFilesystem::ensureDirectiveTokensArePopulated().


The documentation for this struct was generated from the following file: