LLDB mainline
Public Member Functions | Private Attributes | List of all members
lldb_private::RealpathPrefixes Class Reference

#include <RealpathPrefixes.h>

Public Member Functions

 RealpathPrefixes (const FileSpecList &file_spec_list, llvm::IntrusiveRefCntPtr< llvm::vfs::FileSystem > fs=llvm::vfs::getRealFileSystem())
 
std::optional< FileSpecResolveSymlinks (const FileSpec &file_spec)
 
void IncreaseSourceRealpathAttemptCount ()
 
uint32_t GetSourceRealpathAttemptCount () const
 
void IncreaseSourceRealpathCompatibleCount ()
 
uint32_t GetSourceRealpathCompatibleCount () const
 

Private Attributes

std::vector< std::string > m_prefixes
 
llvm::IntrusiveRefCntPtr< llvm::vfs::FileSystem > m_fs
 
lldb::TargetWP m_target
 
uint32_t m_source_realpath_attempt_count = 0
 
uint32_t m_source_realpath_compatible_count = 0
 

Detailed Description

Definition at line 22 of file RealpathPrefixes.h.

Constructor & Destructor Documentation

◆ RealpathPrefixes()

RealpathPrefixes::RealpathPrefixes ( const FileSpecList file_spec_list,
llvm::IntrusiveRefCntPtr< llvm::vfs::FileSystem >  fs = llvm::vfs::getRealFileSystem() 
)
explicit
Parameters
[in]file_spec_listPrefixes are obtained from FileSpecList, through FileSpec::GetPath(), which ensures that the paths are normalized. For example: "./foo/.." -> "" "./foo/../bar" -> "bar"
[in]fsAn optional filesystem to use for realpath'ing. If not set, the real filesystem will be used.

Definition at line 19 of file RealpathPrefixes.cpp.

References lldb_private::FileSpecList::GetSize(), and m_prefixes.

Member Function Documentation

◆ GetSourceRealpathAttemptCount()

uint32_t lldb_private::RealpathPrefixes::GetSourceRealpathAttemptCount ( ) const
inline

◆ GetSourceRealpathCompatibleCount()

uint32_t lldb_private::RealpathPrefixes::GetSourceRealpathCompatibleCount ( ) const
inline

◆ IncreaseSourceRealpathAttemptCount()

void lldb_private::RealpathPrefixes::IncreaseSourceRealpathAttemptCount ( )
inline

Definition at line 42 of file RealpathPrefixes.h.

References m_source_realpath_attempt_count.

Referenced by ResolveSymlinks().

◆ IncreaseSourceRealpathCompatibleCount()

void lldb_private::RealpathPrefixes::IncreaseSourceRealpathCompatibleCount ( )
inline

◆ ResolveSymlinks()

std::optional< FileSpec > RealpathPrefixes::ResolveSymlinks ( const FileSpec file_spec)

Member Data Documentation

◆ m_fs

llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> lldb_private::RealpathPrefixes::m_fs
private

Definition at line 65 of file RealpathPrefixes.h.

Referenced by ResolveSymlinks().

◆ m_prefixes

std::vector<std::string> lldb_private::RealpathPrefixes::m_prefixes
private

Definition at line 62 of file RealpathPrefixes.h.

Referenced by RealpathPrefixes(), and ResolveSymlinks().

◆ m_source_realpath_attempt_count

uint32_t lldb_private::RealpathPrefixes::m_source_realpath_attempt_count = 0
private

◆ m_source_realpath_compatible_count

uint32_t lldb_private::RealpathPrefixes::m_source_realpath_compatible_count = 0
private

◆ m_target

lldb::TargetWP lldb_private::RealpathPrefixes::m_target
private

Definition at line 68 of file RealpathPrefixes.h.


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