forked from OSchip/llvm-project
Fix some undefined beahvior in FileMapping.
This was broken when building a 32-bit native toolchain, as shifting a size_t right by 32 is UB when sizeof(size_t) == 8. llvm-svn: 318462
This commit is contained in:
parent
9d59418f6b
commit
ab1ade496c
|
@ -734,8 +734,8 @@ std::error_code mapped_file_region::init(int FD, uint64_t Offset,
|
|||
|
||||
HANDLE FileMappingHandle =
|
||||
::CreateFileMappingW(FileHandle, 0, flprotect,
|
||||
Size >> 32,
|
||||
Size & 0xffffffff,
|
||||
Hi_32(Size),
|
||||
Lo_32(Size),
|
||||
0);
|
||||
if (FileMappingHandle == NULL) {
|
||||
std::error_code ec = mapWindowsError(GetLastError());
|
||||
|
|
Loading…
Reference in New Issue