21 llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> fs)
24 for (
const FileSpec &file_spec : file_spec_list) {
29std::optional<FileSpec>
36 auto is_path_prefix = [](llvm::StringRef a, llvm::StringRef b,
38 llvm::sys::path::Style style) ->
bool {
39 if (case_sensitive ? a.consume_front(b) : a.consume_front_insensitive(b))
43 return b ==
"/" || a.empty() ||
44 llvm::sys::path::is_separator(a[0], style);
47 std::string file_spec_path = file_spec.
GetPath();
54 LLDB_LOGF(log,
"Realpath'ing support file %s", file_spec_path.c_str());
58 std::error_code ec =
m_fs->getRealPath(file_spec_path, buff);
64 if (realpath != file_spec)
#define LLDB_LOGF(log,...)
size_t GetSize() const
Get the number of files in the file list.
bool IsCaseSensitive() const
Case sensitivity of path.
Style GetPathStyle() const
size_t GetPath(char *path, size_t max_path_length, bool denormalize=true) const
Extract the full path to the file.
llvm::IntrusiveRefCntPtr< llvm::vfs::FileSystem > m_fs
void IncreaseSourceRealpathAttemptCount()
std::optional< FileSpec > ResolveSymlinks(const FileSpec &file_spec)
std::vector< std::string > m_prefixes
RealpathPrefixes(const FileSpecList &file_spec_list, llvm::IntrusiveRefCntPtr< llvm::vfs::FileSystem > fs=llvm::vfs::getRealFileSystem())
A class that represents a running process on the host machine.
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
llvm::SmallString< 256 > PathSmallString