class EntryRef

Declaration

class EntryRef { /* full declaration omitted */ };

Description

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

Declared at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h:236

Member Variables

private std::string Filename
The filename used to access this entry.
private const clang::tooling::dependencies:: CachedFileSystemEntry& Entry
The underlying cached entry.

Method Overview

  • public EntryRef(llvm::StringRef Name, const clang::tooling::dependencies::CachedFileSystemEntry & Entry)
  • public llvm::StringRef getContents() const
  • public Optional<ArrayRef<dependency_directives_scan::Directive>> getDirectiveTokens() const
  • public llvm::vfs::Status getStatus() const
  • public bool isDirectory() const
  • public bool isError() const
  • public llvm::ErrorOr<EntryRef> unwrapError() const

Methods

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

Declared at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h:244

Parameters

llvm::StringRef Name
const clang::tooling::dependencies:: CachedFileSystemEntry& Entry

llvm::StringRef getContents() const

Declared at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h:264

Optional<ArrayRef<
    dependency_directives_scan::Directive>>
getDirectiveTokens() const

Declared at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h:267

llvm::vfs::Status getStatus() const

Declared at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h:247

bool isDirectory() const

Declared at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h:255

bool isError() const

Declared at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h:254

llvm::ErrorOr<EntryRef> unwrapError() const

Description

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

Declared at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h:258