================ @@ -271,15 +271,24 @@ class FileSystem : public llvm::ThreadSafeRefCountedBase<FileSystem>, /// Get the status of the entry at \p Path, if one exists. virtual llvm::ErrorOr<Status> status(const Twine &Path) = 0; - /// Get a \p File object for the file at \p Path, if one exists. + /// Get a \p File object for the text file at \p Path, if one exists. virtual llvm::ErrorOr<std::unique_ptr<File>> openFileForRead(const Twine &Path) = 0; + /// Get a \p File objct for the binary file at \p Path, if one exists. + /// This function should be called instead of openFileForRead if the file + /// should be opened as a binary file. ---------------- kadircet wrote:
can you rather explain the motiviating use case? e.g. "Some filesystems can perform modifications to bytes on-disk when reading as test. Reading as binary ensures contents are received as-is in such cases, on most file systems this is same as `openFileForRead`". https://github.com/llvm/llvm-project/pull/111723 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits