clang  15.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"

Collaboration diagram for clang::tooling::dependencies::CachedFileContents:
Collaboration graph
[legend]

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. More...
 
std::mutex ValueLock
 The mutex that must be locked before mutating directive tokens. More...
 
SmallVector< dependency_directives_scan::Token, 10 > DepDirectiveTokens
 
std::atomic< const Optional< DependencyDirectivesTy > * > DepDirectives
 Accessor to the directive tokens that's atomic to avoid data races. More...
 

Detailed Description

Contents and directive tokens of a cached file entry.

Single instance can be shared between multiple entries.

Definition at line 30 of file DependencyScanningFilesystem.h.

Constructor & Destructor Documentation

◆ CachedFileContents()

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

Definition at line 31 of file DependencyScanningFilesystem.h.

◆ ~CachedFileContents()

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

Definition at line 44 of file DependencyScanningFilesystem.h.

References DepDirectives.

Member Data Documentation

◆ DepDirectives

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

Accessor to the directive tokens that's atomic to avoid data races.

CachedFileContents has ownership of the pointer.

Definition at line 42 of file DependencyScanningFilesystem.h.

Referenced by clang::tooling::dependencies::CachedFileSystemEntry::getDirectiveTokens(), and ~CachedFileContents().

◆ DepDirectiveTokens

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

Definition at line 39 of file DependencyScanningFilesystem.h.

◆ Original

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

Owning storage for the original contents.

Definition at line 35 of file DependencyScanningFilesystem.h.

Referenced by clang::tooling::dependencies::CachedFileSystemEntry::getOriginalContents().

◆ ValueLock

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

The mutex that must be locked before mutating directive tokens.

Definition at line 38 of file DependencyScanningFilesystem.h.


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