LLVM 22.0.0git
llvm::orc::PathResolver Class Reference

Resolves file system paths with optional caching of results. More...

#include "llvm/ExecutionEngine/Orc/TargetProcess/LibraryScanner.h"

Public Member Functions

 PathResolver (std::shared_ptr< LibraryPathCache > cache)
std::optional< std::string > resolve (StringRef Path, std::error_code &ec)
mode_t lstatCached (StringRef Path)
std::optional< std::string > readlinkCached (StringRef Path)
std::optional< std::string > realpathCached (StringRef Path, std::error_code &ec, StringRef base="", bool baseIsResolved=false, long symloopLevel=40)

Detailed Description

Resolves file system paths with optional caching of results.

Supports lstat, readlink, and realpath operations. Can resolve paths relative to a base and handle symbolic links. Caches results to reduce repeated system calls when enabled.

Definition at line 145 of file LibraryScanner.h.

Constructor & Destructor Documentation

◆ PathResolver()

llvm::orc::PathResolver::PathResolver ( std::shared_ptr< LibraryPathCache > cache)
inline

Definition at line 150 of file LibraryScanner.h.

References llvm::move().

Member Function Documentation

◆ lstatCached()

mode_t llvm::orc::PathResolver::lstatCached ( StringRef Path)

Definition at line 434 of file LibraryScanner.cpp.

Referenced by realpathCached().

◆ readlinkCached()

std::optional< std::string > llvm::orc::PathResolver::readlinkCached ( StringRef Path)

Definition at line 448 of file LibraryScanner.cpp.

References PATH_MAX.

Referenced by realpathCached().

◆ realpathCached()

◆ resolve()

std::optional< std::string > llvm::orc::PathResolver::resolve ( StringRef Path,
std::error_code & ec )
inline

Definition at line 153 of file LibraryScanner.h.

References realpathCached().


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