LLVM: llvm::orc::PathResolver Class Reference (original) (raw)
Resolves file system paths with optional caching of results. More...
#include "[llvm/ExecutionEngine/Orc/TargetProcess/LibraryScanner.h](LibraryScanner%5F8h%5Fsource.html)"
| 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 143 of file LibraryScanner.h.
Constructor & Destructor Documentation
| llvm::orc::PathResolver::PathResolver ( std::shared_ptr< LibraryPathCache > cache) | inline |
|---|
Member Function Documentation
◆ lstatCached()
| mode_t llvm::orc::PathResolver::lstatCached | ( | StringRef | Path | ) |
|---|
◆ readlinkCached()
| std::optional< std::string > llvm::orc::PathResolver::readlinkCached | ( | StringRef | Path | ) |
|---|
◆ realpathCached()
| std::optional< std::string > llvm::orc::PathResolver::realpathCached | ( | StringRef | Path, |
|---|---|---|---|
| std::error_code & | ec, | ||
| StringRef | base = "", | ||
| bool | baseIsResolved = false, | ||
| long | symloopLevel = 40 ) |
Definition at line 510 of file LibraryScanner.cpp.
References llvm::sys::path::append(), llvm::sampleprof::Base, llvm::CallingConv::C, llvm::orc::createComponent(), llvm::dbgs(), llvm::sys::path::get_separator(), llvm::sys::path::is_relative(), LLVM_DEBUG, lstatCached(), llvm::orc::normalizePathSegments(), llvm::StringRef::npos, readlinkCached(), llvm::sys::fs::real_path(), realpathCached(), and llvm::orc::Resolved.
Referenced by realpathCached(), and resolve().
◆ resolve()
| std::optional< std::string > llvm::orc::PathResolver::resolve ( StringRef Path, std::error_code & ec ) | inline |
|---|
The documentation for this class was generated from the following files:
- include/llvm/ExecutionEngine/Orc/TargetProcess/LibraryScanner.h
- lib/ExecutionEngine/Orc/TargetProcess/LibraryScanner.cpp