Skip to content

Commit

Permalink
Revert "[ORC] Fix compilation on mingw"
Browse files Browse the repository at this point in the history
This reverts commit 46b1a7c.

Parent commit breaks shared library build, reverting both commits.
  • Loading branch information
c-rhodes committed Jul 14, 2022
1 parent e45aa23 commit f3eacb4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions llvm/lib/ExecutionEngine/Orc/MemoryMapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ void SharedMemoryMapper::reserve(size_t NumBytes,

std::wstring WideSharedMemoryName(SharedMemoryName.begin(),
SharedMemoryName.end());
HANDLE SharedMemoryFile = OpenFileMappingW(FILE_MAP_ALL_ACCESS, FALSE,
WideSharedMemoryName.c_str());
HANDLE SharedMemoryFile = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE,
WideSharedMemoryName.c_str());
if (!SharedMemoryFile)
return OnReserved(errorCodeToError(mapWindowsError(GetLastError())));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ ExecutorSharedMemoryMapperService::reserve(uint64_t Size) {

std::wstring WideSharedMemoryName(SharedMemoryName.begin(),
SharedMemoryName.end());
HANDLE SharedMemoryFile = CreateFileMappingW(
HANDLE SharedMemoryFile = CreateFileMapping(
INVALID_HANDLE_VALUE, NULL, PAGE_EXECUTE_READWRITE, Size >> 32,
Size & 0xffffffff, WideSharedMemoryName.c_str());
if (!SharedMemoryFile)
Expand Down

0 comments on commit f3eacb4

Please sign in to comment.