| Index: lib/Support/MemoryBuffer.cpp
|
| diff --git a/lib/Support/MemoryBuffer.cpp b/lib/Support/MemoryBuffer.cpp
|
| index 7eb0752c22201d44d79fedcbb8f3fe4782d586aa..d6f7f545753bc2f4c3dfb39824890d590173e172 100644
|
| --- a/lib/Support/MemoryBuffer.cpp
|
| +++ b/lib/Support/MemoryBuffer.cpp
|
| @@ -273,10 +273,21 @@ getFileAux(const Twine &Filename, int64_t FileSize, uint64_t MapSize,
|
| static bool shouldUseMmap(int FD,
|
| size_t FileSize,
|
| size_t MapSize,
|
| - off_t Offset,
|
| + int64_t Offset, // @LOCALMOD (?)
|
| bool RequiresNullTerminator,
|
| int PageSize,
|
| bool IsVolatileSize) {
|
| +
|
| + // @LOCALMOD-BEGIN
|
| + // Post 3.3-merge there seems to be a problem using mmap on cygwin. In the
|
| + // meantime, as a LOCALMOD, we disable usage of mmap in MemoryBuffer. The
|
| + // effect of this on the Windows/Cygwin toolchain can be a slightly slower
|
| + // developer-side linkage time.
|
| +#if defined(__CYGWIN__)
|
| + return false;
|
| +#endif
|
| + // @LOCALMOD-END
|
| +
|
| // 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.
|
|
|