yvvan created this revision. yvvan added reviewers: ilya-biryukov, nik, klimek, bkramer.
Prevent accidental memory mapping for main file which sometimes happens through FileSystem::getBufferForFile https://reviews.llvm.org/D47460 Files: include/clang/Basic/VirtualFileSystem.h Index: include/clang/Basic/VirtualFileSystem.h =================================================================== --- include/clang/Basic/VirtualFileSystem.h +++ include/clang/Basic/VirtualFileSystem.h @@ -234,7 +234,7 @@ /// closes the file. llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> getBufferForFile(const Twine &Name, int64_t FileSize = -1, - bool RequiresNullTerminator = true, bool IsVolatile = false); + bool RequiresNullTerminator = true, bool IsVolatile = true); /// Get a directory_iterator for \p Dir. /// \note The 'end' iterator is directory_iterator().
Index: include/clang/Basic/VirtualFileSystem.h =================================================================== --- include/clang/Basic/VirtualFileSystem.h +++ include/clang/Basic/VirtualFileSystem.h @@ -234,7 +234,7 @@ /// closes the file. llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> getBufferForFile(const Twine &Name, int64_t FileSize = -1, - bool RequiresNullTerminator = true, bool IsVolatile = false); + bool RequiresNullTerminator = true, bool IsVolatile = true); /// Get a directory_iterator for \p Dir. /// \note The 'end' iterator is directory_iterator().
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits