summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Unix/Memory.inc
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support/Unix/Memory.inc')
-rw-r--r--llvm/lib/Support/Unix/Memory.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Support/Unix/Memory.inc b/llvm/lib/Support/Unix/Memory.inc
index 7e02244c725..5d19f59bc76 100644
--- a/llvm/lib/Support/Unix/Memory.inc
+++ b/llvm/lib/Support/Unix/Memory.inc
@@ -95,7 +95,7 @@ Memory::allocateMappedMemory(size_t NumBytes,
#ifdef NEED_DEV_ZERO_FOR_MMAP
static int zero_fd = open("/dev/zero", O_RDWR);
if (zero_fd == -1) {
- EC = error_code(errno, system_category());
+ EC = error_code(errno, generic_category());
return MemoryBlock();
}
fd = zero_fd;
@@ -123,7 +123,7 @@ Memory::allocateMappedMemory(size_t NumBytes,
if (NearBlock) //Try again without a near hint
return allocateMappedMemory(NumBytes, nullptr, PFlags, EC);
- EC = error_code(errno, system_category());
+ EC = error_code(errno, generic_category());
return MemoryBlock();
}
@@ -143,7 +143,7 @@ Memory::releaseMappedMemory(MemoryBlock &M) {
return error_code();
if (0 != ::munmap(M.Address, M.Size))
- return error_code(errno, system_category());
+ return error_code(errno, generic_category());
M.Address = nullptr;
M.Size = 0;
@@ -163,7 +163,7 @@ Memory::protectMappedMemory(const MemoryBlock &M, unsigned Flags) {
int Result = ::mprotect(M.Address, M.Size, Protect);
if (Result != 0)
- return error_code(errno, system_category());
+ return error_code(errno, generic_category());
if (Flags & MF_EXEC)
Memory::InvalidateInstructionCache(M.Address, M.Size);
OpenPOWER on IntegriCloud