LLDB mainline
Public Member Functions | Protected Attributes | List of all members
lldb_private::SupportFile Class Reference

Wraps either a FileSpec that represents a local file or a source file whose contents is known (for example because it can be reconstructed from debug info), but that hasn't been written to a file yet. More...

#include <SupportFile.h>

Public Member Functions

 SupportFile ()
 
 SupportFile (const FileSpec &spec)
 
 SupportFile (const FileSpec &spec, const Checksum &checksum)
 
 SupportFile (const SupportFile &other)=delete
 
 SupportFile (SupportFile &&other)=default
 
virtual ~SupportFile ()=default
 
bool operator== (const SupportFile &other) const
 
bool operator!= (const SupportFile &other) const
 
const FileSpecGetSpecOnly () const
 Return the file name only. Useful for resolving breakpoints by file name.
 
const ChecksumGetChecksum () const
 Return the checksum or all zeros if there is none.
 
virtual const FileSpecMaterialize ()
 Materialize the file to disk and return the path to that temporary file.
 
void Update (const FileSpec &file_spec)
 Change the file name.
 

Protected Attributes

FileSpec m_file_spec
 
Checksum m_checksum
 

Detailed Description

Wraps either a FileSpec that represents a local file or a source file whose contents is known (for example because it can be reconstructed from debug info), but that hasn't been written to a file yet.

This also stores an optional checksum of the on-disk content.

Definition at line 21 of file SupportFile.h.

Constructor & Destructor Documentation

◆ SupportFile() [1/5]

lldb_private::SupportFile::SupportFile ( )
inline

Definition at line 23 of file SupportFile.h.

◆ SupportFile() [2/5]

lldb_private::SupportFile::SupportFile ( const FileSpec spec)
inline

Definition at line 24 of file SupportFile.h.

◆ SupportFile() [3/5]

lldb_private::SupportFile::SupportFile ( const FileSpec spec,
const Checksum checksum 
)
inline

Definition at line 25 of file SupportFile.h.

◆ SupportFile() [4/5]

lldb_private::SupportFile::SupportFile ( const SupportFile other)
delete

◆ SupportFile() [5/5]

lldb_private::SupportFile::SupportFile ( SupportFile &&  other)
default

◆ ~SupportFile()

virtual lldb_private::SupportFile::~SupportFile ( )
virtualdefault

Member Function Documentation

◆ GetChecksum()

const Checksum & lldb_private::SupportFile::GetChecksum ( ) const
inline

Return the checksum or all zeros if there is none.

Definition at line 43 of file SupportFile.h.

References m_checksum.

◆ GetSpecOnly()

const FileSpec & lldb_private::SupportFile::GetSpecOnly ( ) const
inline

Return the file name only. Useful for resolving breakpoints by file name.

Definition at line 40 of file SupportFile.h.

References m_file_spec.

◆ Materialize()

virtual const FileSpec & lldb_private::SupportFile::Materialize ( )
inlinevirtual

Materialize the file to disk and return the path to that temporary file.

Definition at line 46 of file SupportFile.h.

References m_file_spec.

◆ operator!=()

bool lldb_private::SupportFile::operator!= ( const SupportFile other) const
inline

Definition at line 37 of file SupportFile.h.

◆ operator==()

bool lldb_private::SupportFile::operator== ( const SupportFile other) const
inline

Definition at line 33 of file SupportFile.h.

References m_checksum, and m_file_spec.

◆ Update()

void lldb_private::SupportFile::Update ( const FileSpec file_spec)
inline

Change the file name.

Definition at line 49 of file SupportFile.h.

References m_file_spec.

Member Data Documentation

◆ m_checksum

Checksum lldb_private::SupportFile::m_checksum
protected

Definition at line 53 of file SupportFile.h.

Referenced by GetChecksum(), and operator==().

◆ m_file_spec

FileSpec lldb_private::SupportFile::m_file_spec
protected

Definition at line 52 of file SupportFile.h.

Referenced by GetSpecOnly(), Materialize(), operator==(), and Update().


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