summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Unix
diff options
context:
space:
mode:
authorJoerg Sonnenberger <joerg@bec.de>2016-09-30 20:16:01 +0000
committerJoerg Sonnenberger <joerg@bec.de>2016-09-30 20:16:01 +0000
commit18a2fb2d2810328e008e9d89978fa55465a92118 (patch)
treeca6132e44446bc6eab33981ef33419370fc5ad8a /llvm/lib/Support/Unix
parenta5c91d8eea45b7bb9c0a8ec5834e64e2f4ff00c2 (diff)
downloadbcm5719-llvm-18a2fb2d2810328e008e9d89978fa55465a92118.tar.gz
bcm5719-llvm-18a2fb2d2810328e008e9d89978fa55465a92118.zip
Retire NEED_DEV_ZERO_FOR_MMAP. It should be needed only on outdated
systems. It wasn't even hooked up in cmake, so problems on such systems would be visible with 3.9 release already. llvm-svn: 282924
Diffstat (limited to 'llvm/lib/Support/Unix')
-rw-r--r--llvm/lib/Support/Unix/Memory.inc16
1 files changed, 0 insertions, 16 deletions
diff --git a/llvm/lib/Support/Unix/Memory.inc b/llvm/lib/Support/Unix/Memory.inc
index f3463e58173..88b2a28c3a1 100644
--- a/llvm/lib/Support/Unix/Memory.inc
+++ b/llvm/lib/Support/Unix/Memory.inc
@@ -91,14 +91,6 @@ Memory::allocateMappedMemory(size_t NumBytes,
const size_t NumPages = (NumBytes+PageSize-1)/PageSize;
int fd = -1;
-#ifdef NEED_DEV_ZERO_FOR_MMAP
- static int zero_fd = open("/dev/zero", O_RDWR);
- if (zero_fd == -1) {
- EC = std::error_code(errno, std::generic_category());
- return MemoryBlock();
- }
- fd = zero_fd;
-#endif
int MMFlags = MAP_PRIVATE |
#ifdef HAVE_MMAP_ANONYMOUS
@@ -185,14 +177,6 @@ Memory::AllocateRWX(size_t NumBytes, const MemoryBlock* NearBlock,
size_t NumPages = (NumBytes+PageSize-1)/PageSize;
int fd = -1;
-#ifdef NEED_DEV_ZERO_FOR_MMAP
- static int zero_fd = open("/dev/zero", O_RDWR);
- if (zero_fd == -1) {
- MakeErrMsg(ErrMsg, "Can't open /dev/zero device");
- return MemoryBlock();
- }
- fd = zero_fd;
-#endif
int flags = MAP_PRIVATE |
#ifdef HAVE_MMAP_ANONYMOUS
OpenPOWER on IntegriCloud