Skip to content

Commit a03db21

Browse files
address review feedback
Created using spr 1.3.6
1 parent 31a738e commit a03db21

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

llvm/lib/Support/Windows/Path.inc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,9 +1007,11 @@ void mapped_file_region::unmapImpl() {
10071007
void mapped_file_region::dontNeedImpl() {}
10081008

10091009
std::error_code mapped_file_region::sync() const {
1010-
if (::FlushViewOfFile(Mapping, 0))
1011-
return std::error_code();
1012-
return mapWindowsError(::GetLastError());
1010+
if (!::FlushViewOfFile(Mapping, Size))
1011+
return mapWindowsError(GetLastError());
1012+
if (!::FlushFileBuffers(FileHandle))
1013+
return mapWindowsError(GetLastError());
1014+
return std::error_code();
10131015
}
10141016

10151017
int mapped_file_region::alignment() {

0 commit comments

Comments
 (0)