class CachedPathResolver
Declaration
class CachedPathResolver { /* full declaration omitted */ };
Description
Small helper that resolves and caches file paths. This helps reduce the number of calls to realpath which is expensive. We assume the input are files, and cache the realpath of their parent. This way we can quickly resolve different files under the same path.
Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerDeclContext.h:29
Method Overview
- public llvm::StringRef resolve(std::string Path, llvm::NonRelocatableStringpool & StringPool)
Methods
ΒΆllvm::StringRef resolve(
std::string Path,
llvm::NonRelocatableStringpool& StringPool)
llvm::StringRef resolve(
std::string Path,
llvm::NonRelocatableStringpool& StringPool)
Description
Resolve a path by calling realpath and cache its result. The returned StringRef is interned in the given \p StringPool.
Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerDeclContext.h:33
Parameters
- std::string Path
- llvm::NonRelocatableStringpool& StringPool