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


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 

Definition at line 300 of file DependencyScanningFilesystem.h.

Member Function Documentation

◆ getContents()

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

◆ getDirectiveTokens()

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

◆ getStatus()

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

◆ isDirectory()

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

◆ isError()

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

◆ unwrapError()

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

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: