Lines Matching refs:FileSpec
38 static constexpr FileSpec::Style GetNativeStyle() { in GetNativeStyle()
40 return FileSpec::Style::windows; in GetNativeStyle()
42 return FileSpec::Style::posix; in GetNativeStyle()
46 bool PathStyleIsPosix(FileSpec::Style style) { in PathStyleIsPosix()
47 return (style == FileSpec::Style::posix || in PathStyleIsPosix()
48 (style == FileSpec::Style::native && in PathStyleIsPosix()
49 GetNativeStyle() == FileSpec::Style::posix)); in PathStyleIsPosix()
52 const char *GetPathSeparators(FileSpec::Style style) { in GetPathSeparators()
56 char GetPreferredPathSeparator(FileSpec::Style style) { in GetPreferredPathSeparator()
60 void Denormalize(llvm::SmallVectorImpl<char> &path, FileSpec::Style style) { in Denormalize()
69 FileSpec::FileSpec() : m_style(GetNativeStyle()) {} in FileSpec() function in FileSpec
74 FileSpec::FileSpec(llvm::StringRef path, Style style) : m_style(style) { in FileSpec() function in FileSpec
78 FileSpec::FileSpec(llvm::StringRef path, const llvm::Triple &Triple) in FileSpec() function in FileSpec
79 : FileSpec{path, Triple.isOSWindows() ? Style::windows : Style::posix} {} in FileSpec()
84 FileSpec::FileSpec(const FileSpec &rhs) in FileSpec() function in FileSpec
91 FileSpec::FileSpec(const FileSpec *rhs) : m_directory(), m_filename() { in FileSpec() function in FileSpec
99 FileSpec::~FileSpec() {} in ~FileSpec()
198 const FileSpec &FileSpec::operator=(const FileSpec &rhs) { in operator =()
208 void FileSpec::SetFile(llvm::StringRef pathname) { SetFile(pathname, m_style); } in SetFile()
215 void FileSpec::SetFile(llvm::StringRef pathname, Style style) { in SetFile()
253 void FileSpec::SetFile(llvm::StringRef path, const llvm::Triple &Triple) { in SetFile()
264 FileSpec::operator bool() const { return m_filename || m_directory; } in operator bool()
273 bool FileSpec::operator!() const { return !m_directory && !m_filename; } in operator !()
275 bool FileSpec::DirectoryEquals(const FileSpec &rhs) const { in DirectoryEquals()
280 bool FileSpec::FileEquals(const FileSpec &rhs) const { in FileEquals()
288 bool FileSpec::operator==(const FileSpec &rhs) const { in operator ==()
295 bool FileSpec::operator!=(const FileSpec &rhs) const { return !(*this == rhs); } in operator !=()
300 bool FileSpec::operator<(const FileSpec &rhs) const { in operator <()
301 return FileSpec::Compare(*this, rhs, true) < 0; in operator <()
307 Stream &lldb_private::operator<<(Stream &s, const FileSpec &f) { in operator <<()
316 void FileSpec::Clear() { in Clear()
331 int FileSpec::Compare(const FileSpec &a, const FileSpec &b, bool full) { in Compare()
352 bool FileSpec::Equal(const FileSpec &a, const FileSpec &b, bool full) { in Equal()
374 void FileSpec::Dump(Stream *s) const { in Dump()
384 FileSpec::Style FileSpec::GetPathStyle() const { return m_style; } in GetPathStyle()
389 ConstString &FileSpec::GetDirectory() { return m_directory; } in GetDirectory()
394 const ConstString &FileSpec::GetDirectory() const { return m_directory; } in GetDirectory()
399 ConstString &FileSpec::GetFilename() { return m_filename; } in GetFilename()
404 const ConstString &FileSpec::GetFilename() const { return m_filename; } in GetFilename()
410 size_t FileSpec::GetPath(char *path, size_t path_max_len, in GetPath()
420 std::string FileSpec::GetPath(bool denormalize) const { in GetPath()
426 const char *FileSpec::GetCString(bool denormalize) const { in GetCString()
430 void FileSpec::GetPath(llvm::SmallVectorImpl<char> &path, in GetPath()
446 ConstString FileSpec::GetFileNameExtension() const { in GetFileNameExtension()
451 ConstString FileSpec::GetFileNameStrippingExtension() const { in GetFileNameStrippingExtension()
459 size_t FileSpec::MemorySize() const { in MemorySize()
463 FileSpec
464 FileSpec::CopyByAppendingPathComponent(llvm::StringRef component) const { in CopyByAppendingPathComponent()
465 FileSpec ret = *this; in CopyByAppendingPathComponent()
470 FileSpec FileSpec::CopyByRemovingLastPathComponent() const { in CopyByRemovingLastPathComponent()
474 return FileSpec(llvm::sys::path::parent_path(current_path, m_style), in CopyByRemovingLastPathComponent()
479 ConstString FileSpec::GetLastPathComponent() const { in GetLastPathComponent()
485 void FileSpec::PrependPathComponent(llvm::StringRef component) { in PrependPathComponent()
495 void FileSpec::PrependPathComponent(const FileSpec &new_path) { in PrependPathComponent()
499 void FileSpec::AppendPathComponent(llvm::StringRef component) { in AppendPathComponent()
506 void FileSpec::AppendPathComponent(const FileSpec &new_path) { in AppendPathComponent()
510 bool FileSpec::RemoveLastPathComponent() { in RemoveLastPathComponent()
528 bool FileSpec::IsSourceImplementationFile() const { in IsSourceImplementationFile()
541 bool FileSpec::IsRelative() const { in IsRelative()
545 bool FileSpec::IsAbsolute() const { in IsAbsolute()
560 void llvm::format_provider<FileSpec>::format(const FileSpec &F, in format()