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

The SourceFileCache class separates the source manager from the cache of source files. More...

#include <SourceManager.h>

Public Member Functions

 SourceFileCache ()=default
 
 ~SourceFileCache ()=default
 
void AddSourceFile (const FileSpec &file_spec, FileSP file_sp)
 
void RemoveSourceFile (const FileSP &file_sp)
 
FileSP FindSourceFile (const FileSpec &file_spec) const
 
void Clear ()
 
void Dump (Stream &stream) const
 

Private Types

typedef std::map< FileSpec, FileSPFileCache
 

Private Member Functions

void AddSourceFileImpl (const FileSpec &file_spec, FileSP file_sp)
 

Private Attributes

FileCache m_file_cache
 
llvm::sys::RWMutex m_mutex
 

Detailed Description

The SourceFileCache class separates the source manager from the cache of source files.

There is one source manager per Target but both the Debugger and the Process have their own source caches.

The SourceFileCache just handles adding, storing, removing and looking up source files. The caching policies are implemented in SourceManager::GetFile.

Definition at line 108 of file SourceManager.h.

Member Typedef Documentation

◆ FileCache

Definition at line 126 of file SourceManager.h.

Constructor & Destructor Documentation

◆ SourceFileCache()

lldb_private::SourceManager::SourceFileCache::SourceFileCache ( )
default

◆ ~SourceFileCache()

lldb_private::SourceManager::SourceFileCache::~SourceFileCache ( )
default

Member Function Documentation

◆ AddSourceFile()

void SourceManager::SourceFileCache::AddSourceFile ( const FileSpec file_spec,
FileSP  file_sp 
)

Definition at line 774 of file SourceManager.cpp.

◆ AddSourceFileImpl()

void SourceManager::SourceFileCache::AddSourceFileImpl ( const FileSpec file_spec,
FileSP  file_sp 
)
private

Definition at line 802 of file SourceManager.cpp.

◆ Clear()

void lldb_private::SourceManager::SourceFileCache::Clear ( )
inline

◆ Dump()

void SourceManager::SourceFileCache::Dump ( Stream stream) const

◆ FindSourceFile()

SourceManager::FileSP SourceManager::SourceFileCache::FindSourceFile ( const FileSpec file_spec) const

Definition at line 813 of file SourceManager.cpp.

◆ RemoveSourceFile()

void SourceManager::SourceFileCache::RemoveSourceFile ( const FileSP file_sp)

Definition at line 786 of file SourceManager.cpp.

Member Data Documentation

◆ m_file_cache

FileCache lldb_private::SourceManager::SourceFileCache::m_file_cache
private

Definition at line 127 of file SourceManager.h.

Referenced by Clear().

◆ m_mutex

llvm::sys::RWMutex lldb_private::SourceManager::SourceFileCache::m_mutex
mutableprivate

Definition at line 129 of file SourceManager.h.


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