aboutsummaryrefslogtreecommitdiff
path: root/lib/System/Unix/Memory.inc
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-08-23 20:34:57 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-08-23 20:34:57 +0000
commit51c5a286bae5ad27ddc49602f44b7ea7253a4cc9 (patch)
tree23e5816bdf4e8ea6f02a6d639101c9132ac3ea54 /lib/System/Unix/Memory.inc
parentcc2e0845c30cbbf79b51c6c39c102af27c19a1a8 (diff)
For PR797:
Final removal of exceptions from lib/System and adjustment of users to accommodate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29846 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/Unix/Memory.inc')
-rw-r--r--lib/System/Unix/Memory.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/System/Unix/Memory.inc b/lib/System/Unix/Memory.inc
index 7faa2200c4..d040416175 100644
--- a/lib/System/Unix/Memory.inc
+++ b/lib/System/Unix/Memory.inc
@@ -35,7 +35,7 @@ llvm::sys::Memory::AllocateRWX(unsigned NumBytes, const MemoryBlock* NearBlock,
#ifdef NEED_DEV_ZERO_FOR_MMAP
static int zero_fd = open("/dev/zero", O_RDWR);
if (zero_fd == -1) {
- GetErrno("Can't open /dev/zero device", ErrMsg);
+ MakeErrMsg(ErrMsg, "Can't open /dev/zero device");
return MemoryBlock();
}
fd = zero_fd;
@@ -58,7 +58,7 @@ llvm::sys::Memory::AllocateRWX(unsigned NumBytes, const MemoryBlock* NearBlock,
if (NearBlock) //Try again without a near hint
return AllocateRWX(NumBytes, 0);
- GetErrno("Can't allocate RWX Memory", ErrMsg);
+ MakeErrMsg(ErrMsg, "Can't allocate RWX Memory");
return MemoryBlock();
}
MemoryBlock result;
@@ -70,7 +70,7 @@ llvm::sys::Memory::AllocateRWX(unsigned NumBytes, const MemoryBlock* NearBlock,
bool llvm::sys::Memory::ReleaseRWX(MemoryBlock &M, std::string *ErrMsg) {
if (M.Address == 0 || M.Size == 0) return false;
if (0 != ::munmap(M.Address, M.Size))
- return GetErrno("Can't release RWX Memory", ErrMsg);
+ return MakeErrMsg(ErrMsg, "Can't release RWX Memory");
return false;
}