Lines Matching refs:FileSpec

37 static constexpr FileSpec::Style GetNativeStyle() {  in GetNativeStyle()
39 return FileSpec::Style::windows; in GetNativeStyle()
41 return FileSpec::Style::posix; in GetNativeStyle()
45 bool PathStyleIsPosix(FileSpec::Style style) { in PathStyleIsPosix()
46 return (style == FileSpec::Style::posix || in PathStyleIsPosix()
47 (style == FileSpec::Style::native && in PathStyleIsPosix()
48 GetNativeStyle() == FileSpec::Style::posix)); in PathStyleIsPosix()
51 const char *GetPathSeparators(FileSpec::Style style) { in GetPathSeparators()
55 char GetPreferredPathSeparator(FileSpec::Style style) { in GetPreferredPathSeparator()
59 void Denormalize(llvm::SmallVectorImpl<char> &path, FileSpec::Style style) { in Denormalize()
68 FileSpec::FileSpec() : m_style(GetNativeStyle()) {} in FileSpec() function in FileSpec
71 FileSpec::FileSpec(llvm::StringRef path, Style style) : m_style(style) { in FileSpec() function in FileSpec
75 FileSpec::FileSpec(llvm::StringRef path, const llvm::Triple &triple) in FileSpec() function in FileSpec
76 : FileSpec{path, triple.isOSWindows() ? Style::windows : Style::posix} {} in FileSpec()
169 void FileSpec::SetFile(llvm::StringRef pathname) { SetFile(pathname, m_style); } in SetFile()
174 void FileSpec::SetFile(llvm::StringRef pathname, Style style) { in SetFile()
212 void FileSpec::SetFile(llvm::StringRef path, const llvm::Triple &triple) { in SetFile()
221 FileSpec::operator bool() const { return m_filename || m_directory; } in operator bool()
228 bool FileSpec::operator!() const { return !m_directory && !m_filename; } in operator !()
230 bool FileSpec::DirectoryEquals(const FileSpec &rhs) const { in DirectoryEquals()
235 bool FileSpec::FileEquals(const FileSpec &rhs) const { in FileEquals()
241 bool FileSpec::operator==(const FileSpec &rhs) const { in operator ==()
246 bool FileSpec::operator!=(const FileSpec &rhs) const { return !(*this == rhs); } in operator !=()
249 bool FileSpec::operator<(const FileSpec &rhs) const { in operator <()
250 return FileSpec::Compare(*this, rhs, true) < 0; in operator <()
254 Stream &lldb_private::operator<<(Stream &s, const FileSpec &f) { in operator <<()
261 void FileSpec::Clear() { in Clear()
274 int FileSpec::Compare(const FileSpec &a, const FileSpec &b, bool full) { in Compare()
295 bool FileSpec::Equal(const FileSpec &a, const FileSpec &b, bool full) { in Equal()
302 bool FileSpec::Match(const FileSpec &pattern, const FileSpec &file) { in Match()
310 llvm::Optional<FileSpec::Style> FileSpec::GuessPathStyle(llvm::StringRef absolute_path) { in GuessPathStyle()
324 void FileSpec::Dump(llvm::raw_ostream &s) const { in Dump()
332 FileSpec::Style FileSpec::GetPathStyle() const { return m_style; } in GetPathStyle()
335 ConstString &FileSpec::GetDirectory() { return m_directory; } in GetDirectory()
338 ConstString FileSpec::GetDirectory() const { return m_directory; } in GetDirectory()
341 ConstString &FileSpec::GetFilename() { return m_filename; } in GetFilename()
344 ConstString FileSpec::GetFilename() const { return m_filename; } in GetFilename()
348 size_t FileSpec::GetPath(char *path, size_t path_max_len, in GetPath()
358 std::string FileSpec::GetPath(bool denormalize) const { in GetPath()
364 const char *FileSpec::GetCString(bool denormalize) const { in GetCString()
368 void FileSpec::GetPath(llvm::SmallVectorImpl<char> &path, in GetPath()
384 ConstString FileSpec::GetFileNameExtension() const { in GetFileNameExtension()
389 ConstString FileSpec::GetFileNameStrippingExtension() const { in GetFileNameStrippingExtension()
395 size_t FileSpec::MemorySize() const { in MemorySize()
399 FileSpec
400 FileSpec::CopyByAppendingPathComponent(llvm::StringRef component) const { in CopyByAppendingPathComponent()
401 FileSpec ret = *this; in CopyByAppendingPathComponent()
406 FileSpec FileSpec::CopyByRemovingLastPathComponent() const { in CopyByRemovingLastPathComponent()
410 return FileSpec(llvm::sys::path::parent_path(current_path, m_style), in CopyByRemovingLastPathComponent()
415 ConstString FileSpec::GetLastPathComponent() const { in GetLastPathComponent()
421 void FileSpec::PrependPathComponent(llvm::StringRef component) { in PrependPathComponent()
431 void FileSpec::PrependPathComponent(const FileSpec &new_path) { in PrependPathComponent()
435 void FileSpec::AppendPathComponent(llvm::StringRef component) { in AppendPathComponent()
442 void FileSpec::AppendPathComponent(const FileSpec &new_path) { in AppendPathComponent()
446 bool FileSpec::RemoveLastPathComponent() { in RemoveLastPathComponent()
462 bool FileSpec::IsSourceImplementationFile() const { in IsSourceImplementationFile()
475 bool FileSpec::IsRelative() const { in IsRelative()
479 bool FileSpec::IsAbsolute() const { in IsAbsolute()
494 void FileSpec::MakeAbsolute(const FileSpec &dir) { in MakeAbsolute()
499 void llvm::format_provider<FileSpec>::format(const FileSpec &F, in format()
543 io.enumCase(value, "windows", FileSpecStyle(FileSpec::Style::windows)); in enumeration()
544 io.enumCase(value, "posix", FileSpecStyle(FileSpec::Style::posix)); in enumeration()
545 io.enumCase(value, "native", FileSpecStyle(FileSpec::Style::native)); in enumeration()
548 void llvm::yaml::MappingTraits<FileSpec>::mapping(IO &io, FileSpec &f) { in mapping()