18#include "llvm/ADT/SmallString.h"
73 return !(*
this == rhs);
78 return this->
operator bool();
80SBFileSpec::operator bool()
const {
83 return m_opaque_up->operator bool();
102 llvm::SmallString<64> result(src_path);
104 ::snprintf(dst_path, dst_len,
"%s", result.c_str());
105 return std::min(dst_len - 1, result.size());
118 directory.ClearFilename();
119 return directory.GetPathAsConstString().GetCString();
125 if (filename && filename[0])
134 if (directory && directory[0])
143 uint32_t result =
m_opaque_up->GetPath(dst_path, dst_len);
145 if (result == 0 && dst_path && dst_len > 0)
#define LLDB_INSTRUMENT_VA(...)
void SetFilename(const char *filename)
void SetFileSpec(const lldb_private::FileSpec &fspec)
void AppendPathComponent(const char *file_or_directory)
static int ResolvePath(const char *src_path, char *dst_path, size_t dst_len)
const SBFileSpec & operator=(const lldb::SBFileSpec &rhs)
const lldb_private::FileSpec & operator*() const
const lldb_private::FileSpec & ref() const
uint32_t GetPath(char *dst_path, size_t dst_len) const
const lldb_private::FileSpec * get() const
const char * GetFilename() const
bool GetDescription(lldb::SBStream &description) const
bool ResolveExecutableLocation()
void SetDirectory(const char *directory)
const char * GetDirectory() const
bool operator!=(const SBFileSpec &rhs) const
bool operator==(const SBFileSpec &rhs) const
std::unique_ptr< lldb_private::FileSpec > m_opaque_up
const lldb_private::FileSpec * operator->() const
lldb_private::Stream & ref()
void Resolve(llvm::SmallVectorImpl< char > &path)
Resolve path to make it canonical.
bool ResolveExecutableLocation(FileSpec &file_spec)
Call into the Host to see if it can help find the file.
bool Exists(const FileSpec &file_spec) const
Returns whether the given file exists.
static FileSystem & Instance()
A stream class that can stream formatted output to a file.
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
A class that represents a running process on the host machine.
std::unique_ptr< T > clone(const std::unique_ptr< T > &src)