LLVM 22.0.0git
llvm::vfs::RedirectingFileSystem::LookupResult Struct Reference

Represents the result of a path lookup into the RedirectingFileSystem. More...

#include "llvm/Support/VirtualFileSystem.h"

Public Member Functions

LLVM_ABI LookupResult (Entry *E, sys::path::const_iterator Start, sys::path::const_iterator End)
std::optional< StringRefgetExternalRedirect () const
 If the found Entry maps the input path to a path in the external file system (i.e.
LLVM_ABI void getPath (llvm::SmallVectorImpl< char > &Path) const
 Get the (canonical) path of the found entry.

Public Attributes

llvm::SmallVector< Entry *, 32 > Parents
 Chain of parent directory entries for E.
EntryE
 The entry the looked-up path corresponds to.

Detailed Description

Represents the result of a path lookup into the RedirectingFileSystem.

Definition at line 916 of file VirtualFileSystem.h.

Constructor & Destructor Documentation

◆ LookupResult()

RedirectingFileSystem::LookupResult::LookupResult ( Entry * E,
sys::path::const_iterator Start,
sys::path::const_iterator End )

Definition at line 2272 of file VirtualFileSystem.cpp.

References llvm::sys::path::append(), assert(), llvm::dyn_cast(), and E.

Member Function Documentation

◆ getExternalRedirect()

std::optional< StringRef > llvm::vfs::RedirectingFileSystem::LookupResult::getExternalRedirect ( ) const
inline

If the found Entry maps the input path to a path in the external file system (i.e.

it is a FileEntry or DirectoryRemapEntry), returns that path.

Definition at line 936 of file VirtualFileSystem.h.

References llvm::dyn_cast(), E, and llvm::isa().

◆ getPath()

void RedirectingFileSystem::LookupResult::getPath ( llvm::SmallVectorImpl< char > & Path) const

Get the (canonical) path of the found entry.

This uses the as-written path components from the VFS specification.

Definition at line 2287 of file VirtualFileSystem.cpp.

References llvm::sys::path::append(), E, and Parents.

Member Data Documentation

◆ E

Entry* llvm::vfs::RedirectingFileSystem::LookupResult::E

The entry the looked-up path corresponds to.

Definition at line 921 of file VirtualFileSystem.h.

Referenced by getExternalRedirect(), getPath(), and LookupResult().

◆ Parents

llvm::SmallVector<Entry *, 32> llvm::vfs::RedirectingFileSystem::LookupResult::Parents

Chain of parent directory entries for E.

Definition at line 918 of file VirtualFileSystem.h.

Referenced by getPath().


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