clang 20.0.0git
Public Member Functions | Friends | List of all members
clang::tooling::dependencies::EntryRef Class Reference

Reference to a CachedFileSystemEntry. More...

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

Public Member Functions

 EntryRef (StringRef Name, const CachedFileSystemEntry &Entry)
 
llvm::vfs::Status getStatus () const
 
bool isError () const
 
bool isDirectory () const
 
llvm::ErrorOr< EntryRefunwrapError () const
 If the cached entry represents an error, promotes it into ErrorOr.
 
StringRef getContents () const
 
std::optional< ArrayRef< dependency_directives_scan::Directive > > getDirectiveTokens () const
 

Friends

class DependencyScanningWorkerFilesystem
 

Detailed Description

Reference to a CachedFileSystemEntry.

If the underlying entry is an opened file, this wrapper returns the file contents and the scanned preprocessor directives.

Definition at line 290 of file DependencyScanningFilesystem.h.

Constructor & Destructor Documentation

◆ EntryRef()

clang::tooling::dependencies::EntryRef::EntryRef ( StringRef  Name,
const CachedFileSystemEntry Entry 
)
inline

Definition at line 300 of file DependencyScanningFilesystem.h.

Member Function Documentation

◆ getContents()

StringRef clang::tooling::dependencies::EntryRef::getContents ( ) const
inline

◆ getDirectiveTokens()

std::optional< ArrayRef< dependency_directives_scan::Directive > > clang::tooling::dependencies::EntryRef::getDirectiveTokens ( ) const
inline

◆ getStatus()

llvm::vfs::Status clang::tooling::dependencies::EntryRef::getStatus ( ) const
inline

◆ isDirectory()

bool clang::tooling::dependencies::EntryRef::isDirectory ( ) const
inline

◆ isError()

bool clang::tooling::dependencies::EntryRef::isError ( ) const
inline

◆ unwrapError()

llvm::ErrorOr< EntryRef > clang::tooling::dependencies::EntryRef::unwrapError ( ) const
inline

If the cached entry represents an error, promotes it into ErrorOr.

Definition at line 314 of file DependencyScanningFilesystem.h.

References clang::tooling::dependencies::CachedFileSystemEntry::getError(), and isError().

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

Friends And Related Function Documentation

◆ DependencyScanningWorkerFilesystem

Definition at line 297 of file DependencyScanningFilesystem.h.


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