summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Unix/Memory.inc
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-05-02 05:58:09 +0000
committerFangrui Song <maskray@google.com>2019-05-02 05:58:09 +0000
commit7d0e8cb1e213eacb091c0731a92f43677c0915e6 (patch)
tree6921ca22223eea6114217fb4aae42cc8c596bbcc /llvm/lib/Support/Unix/Memory.inc
parent64399da8b824b7bedb7b88ff2a13c79aa853b7f1 (diff)
downloadbcm5719-llvm-7d0e8cb1e213eacb091c0731a92f43677c0915e6.tar.gz
bcm5719-llvm-7d0e8cb1e213eacb091c0731a92f43677c0915e6.zip
[Support] Don't check MAP_ANONYMOUS, just use MAP_ANON
Though being marked "deprecated" by the Linux man-pages project (MAP_ANON is a synonym of MAP_ANONYMOUS), it is the mostly widely available macro - many systems that don't provide MAP_ANONYMOUS have MAP_ANON. MAP_ANON is also used here and there in compiler-rt. llvm-svn: 359758
Diffstat (limited to 'llvm/lib/Support/Unix/Memory.inc')
-rw-r--r--llvm/lib/Support/Unix/Memory.inc9
1 files changed, 1 insertions, 8 deletions
diff --git a/llvm/lib/Support/Unix/Memory.inc b/llvm/lib/Support/Unix/Memory.inc
index d03ba6e8484..b8f5df5f72e 100644
--- a/llvm/lib/Support/Unix/Memory.inc
+++ b/llvm/lib/Support/Unix/Memory.inc
@@ -93,14 +93,7 @@ Memory::allocateMappedMemory(size_t NumBytes,
int fd = -1;
- int MMFlags = MAP_PRIVATE |
-#ifdef MAP_ANONYMOUS
- MAP_ANONYMOUS
-#else
- MAP_ANON
-#endif
- ; // Ends statement above
-
+ int MMFlags = MAP_PRIVATE | MAP_ANON;
int Protect = getPosixProtectionFlags(PFlags);
#if defined(__NetBSD__) && defined(PROT_MPROTECT)
OpenPOWER on IntegriCloud