LLVM 17.0.0git
llvm::CachedPathResolver Class Reference

Small helper that resolves and caches file paths. More...

#include "llvm/DWARFLinker/DWARFLinkerDeclContext.h"

## Public Member Functions

StringRef resolve (const std::string &Path, NonRelocatableStringpool &StringPool)
Resolve a path by calling realpath and cache its result.

## Detailed 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.

Definition at line 32 of file DWARFLinkerDeclContext.h.

## ◆ resolve()

 StringRef llvm::CachedPathResolver::resolve ( const std::string & Path, NonRelocatableStringpool & StringPool )
inline

Resolve a path by calling realpath and cache its result.

The returned StringRef is interned in the given StringPool.

Definition at line 36 of file DWARFLinkerDeclContext.h.

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