unix-conf/.emacs.d/elpa/ac-clang-20150906.1008/clang-server/patch/invalidate-mmap.patch

23 lines
701 B
Diff
Raw Normal View History

2016-02-18 13:53:30 +00:00
Index: lib/Support/MemoryBuffer.cpp
===================================================================
--- lib/Support/MemoryBuffer.cpp (revision 226551)
+++ lib/Support/MemoryBuffer.cpp (working copy)
@@ -267,6 +267,9 @@
bool RequiresNullTerminator,
int PageSize,
bool IsVolatileSize) {
+#if 1
+ return false;
+#else
// mmap may leave the buffer without null terminator if the file size changed
// by the time the last page is mapped in, so avoid it if the file size is
// likely to change.
@@ -306,6 +309,7 @@
return false;
return true;
+#endif
}
static ErrorOr<std::unique_ptr<MemoryBuffer>>