diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-02-10 16:44:39 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:39 +0300 |
commit | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch) | |
tree | 64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/libs/llvm12/include/llvm/Support/VirtualFileSystem.h | |
parent | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff) | |
download | ydb-e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0.tar.gz |
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/llvm12/include/llvm/Support/VirtualFileSystem.h')
-rw-r--r-- | contrib/libs/llvm12/include/llvm/Support/VirtualFileSystem.h | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/contrib/libs/llvm12/include/llvm/Support/VirtualFileSystem.h b/contrib/libs/llvm12/include/llvm/Support/VirtualFileSystem.h index dd75b493f0..4729450b67 100644 --- a/contrib/libs/llvm12/include/llvm/Support/VirtualFileSystem.h +++ b/contrib/libs/llvm12/include/llvm/Support/VirtualFileSystem.h @@ -45,7 +45,7 @@ namespace llvm { class MemoryBuffer; -class MemoryBufferRef; +class MemoryBufferRef; class Twine; namespace vfs { @@ -503,8 +503,8 @@ public: /// false if the file or directory already exists in the file system with /// different contents. bool addFileNoOwn(const Twine &Path, time_t ModificationTime, - const llvm::MemoryBufferRef &Buffer, - Optional<uint32_t> User = None, + const llvm::MemoryBufferRef &Buffer, + Optional<uint32_t> User = None, Optional<uint32_t> Group = None, Optional<llvm::sys::fs::file_type> Type = None, Optional<llvm::sys::fs::perms> Perms = None); @@ -539,7 +539,7 @@ llvm::sys::fs::UniqueID getNextVirtualUniqueID(); /// Gets a \p FileSystem for a virtual file system described in YAML /// format. -std::unique_ptr<FileSystem> +std::unique_ptr<FileSystem> getVFSFromYAML(std::unique_ptr<llvm::MemoryBuffer> Buffer, llvm::SourceMgr::DiagHandlerTy DiagHandler, StringRef YAMLFilePath, void *DiagContext = nullptr, @@ -690,13 +690,13 @@ private: friend class VFSFromYamlDirIterImpl; friend class RedirectingFileSystemParser; - bool shouldUseExternalFS() const { return IsFallthrough; } + bool shouldUseExternalFS() const { return IsFallthrough; } + + /// Canonicalize path by removing ".", "..", "./", components. This is + /// a VFS request, do not bother about symlinks in the path components + /// but canonicalize in order to perform the correct entry search. + std::error_code makeCanonical(SmallVectorImpl<char> &Path) const; - /// Canonicalize path by removing ".", "..", "./", components. This is - /// a VFS request, do not bother about symlinks in the path components - /// but canonicalize in order to perform the correct entry search. - std::error_code makeCanonical(SmallVectorImpl<char> &Path) const; - // In a RedirectingFileSystem, keys can be specified in Posix or Windows // style (or even a mixture of both), so this comparison helper allows // slashes (representing a root) to match backslashes (and vice versa). Note @@ -761,20 +761,20 @@ private: public: /// Looks up \p Path in \c Roots. - ErrorOr<Entry *> lookupPath(StringRef Path) const; + ErrorOr<Entry *> lookupPath(StringRef Path) const; /// Parses \p Buffer, which is expected to be in YAML format and /// returns a virtual file system representing its contents. - static std::unique_ptr<RedirectingFileSystem> + static std::unique_ptr<RedirectingFileSystem> create(std::unique_ptr<MemoryBuffer> Buffer, SourceMgr::DiagHandlerTy DiagHandler, StringRef YAMLFilePath, void *DiagContext, IntrusiveRefCntPtr<FileSystem> ExternalFS); - /// Redirect each of the remapped files from first to second. - static std::unique_ptr<RedirectingFileSystem> - create(ArrayRef<std::pair<std::string, std::string>> RemappedFiles, - bool UseExternalNames, FileSystem &ExternalFS); - + /// Redirect each of the remapped files from first to second. + static std::unique_ptr<RedirectingFileSystem> + create(ArrayRef<std::pair<std::string, std::string>> RemappedFiles, + bool UseExternalNames, FileSystem &ExternalFS); + ErrorOr<Status> status(const Twine &Path) override; ErrorOr<std::unique_ptr<File>> openFileForRead(const Twine &Path) override; @@ -795,10 +795,10 @@ public: StringRef getExternalContentsPrefixDir() const; - void setFallthrough(bool Fallthrough); - - std::vector<llvm::StringRef> getRoots() const; - + void setFallthrough(bool Fallthrough); + + std::vector<llvm::StringRef> getRoots() const; + void dump(raw_ostream &OS) const; void dumpEntry(raw_ostream &OS, Entry *E, int NumSpaces = 0) const; #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) |