summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-06-12 01:25:33 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-06-12 01:25:33 +0000
commit116f21c4dd1555c6642aa72a8b695324eef8376d (patch)
tree06807d86f769e4398f5f17da12cf06203099fd46 /llvm/lib
parent3c2f0e84f8332433bf86d97564c56a67e2de6edb (diff)
downloadbcm5719-llvm-116f21c4dd1555c6642aa72a8b695324eef8376d.tar.gz
bcm5719-llvm-116f21c4dd1555c6642aa72a8b695324eef8376d.zip
Used mapWindowsError. I missed these in the initial transition.
llvm-svn: 210729
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Support/Windows/Memory.inc7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Support/Windows/Memory.inc b/llvm/lib/Support/Windows/Memory.inc
index a5f1c14b69a..d410df35aa0 100644
--- a/llvm/lib/Support/Windows/Memory.inc
+++ b/llvm/lib/Support/Windows/Memory.inc
@@ -15,6 +15,7 @@
#include "llvm/Support/DataTypes.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Process.h"
+#include "llvm/Support/WindowsError.h"
// The Windows.h header must be the last one included.
#include "WindowsSupport.h"
@@ -99,7 +100,7 @@ MemoryBlock Memory::allocateMappedMemory(size_t NumBytes,
// Try again without the NearBlock hint
return allocateMappedMemory(NumBytes, NULL, Flags, EC);
}
- EC = error_code(::GetLastError(), system_category());
+ EC = mapWindowsError(::GetLastError());
return MemoryBlock();
}
@@ -118,7 +119,7 @@ error_code Memory::releaseMappedMemory(MemoryBlock &M) {
return error_code();
if (!VirtualFree(M.Address, 0, MEM_RELEASE))
- return error_code(::GetLastError(), system_category());
+ return mapWindowsError(::GetLastError());
M.Address = 0;
M.Size = 0;
@@ -135,7 +136,7 @@ error_code Memory::protectMappedMemory(const MemoryBlock &M,
DWORD OldFlags;
if (!VirtualProtect(M.Address, M.Size, Protect, &OldFlags))
- return error_code(::GetLastError(), system_category());
+ return mapWindowsError(::GetLastError());
if (Flags & MF_EXEC)
Memory::InvalidateInstructionCache(M.Address, M.Size);
OpenPOWER on IntegriCloud