Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Unified Diff: lib/Support/MemoryBuffer.cpp

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/Support/LockFileManager.cpp ('k') | lib/Support/StreamingMemoryObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « lib/Support/LockFileManager.cpp ('k') | lib/Support/StreamingMemoryObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698