[PATCH] D47460: Treat files as volatile by default
Ivan Donchevskii via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 29 02:02:32 PDT 2018
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().
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47460.148858.patch
Type: text/x-patch
Size: 637 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180529/39dc9d1d/attachment.bin>
More information about the cfe-commits
mailing list