aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/MemoryBuffer.cpp
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-05-19 16:13:28 +0000
committerAlp Toker <alp@nuanti.com>2014-05-19 16:13:28 +0000
commitd71b6dfd854f4dbff946ae22a7f4b89cbd22048e (patch)
tree57285828e98083e0aa66909a36c40af23ffca75a /llvm/lib/Support/MemoryBuffer.cpp
parent6d8b9a747c17d900bac09c5a800f5c4b7a3c5061 (diff)
downloadllvm-d71b6dfd854f4dbff946ae22a7f4b89cbd22048e.zip
llvm-d71b6dfd854f4dbff946ae22a7f4b89cbd22048e.tar.gz
llvm-d71b6dfd854f4dbff946ae22a7f4b89cbd22048e.tar.bz2
MemoryBuffer: Use GetNativeSystemInfo()
Removes old 4096 byte workaround. This functionality has been available since Windows XP. llvm-svn: 209137
Diffstat (limited to 'llvm/lib/Support/MemoryBuffer.cpp')
-rw-r--r--llvm/lib/Support/MemoryBuffer.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/llvm/lib/Support/MemoryBuffer.cpp b/llvm/lib/Support/MemoryBuffer.cpp
index 9be05d6..629d885 100644
--- a/llvm/lib/Support/MemoryBuffer.cpp
+++ b/llvm/lib/Support/MemoryBuffer.cpp
@@ -310,15 +310,6 @@ static bool shouldUseMmap(int FD,
if (End != FileSize)
return false;
-#if defined(_WIN32) || defined(__CYGWIN__)
- // Don't peek the next page if file is multiple of *physical* pagesize(4k)
- // but is not multiple of AllocationGranularity(64k),
- // when a null terminator is required.
- // FIXME: It's not good to hardcode 4096 here. dwPageSize shows 4096.
- if ((FileSize & (4096 - 1)) == 0)
- return false;
-#endif
-
// Don't try to map files that are exactly a multiple of the system page size
// if we need a null terminator.
if ((FileSize & (PageSize -1)) == 0)