Skip to content

Commit bf95610

Browse files
mstorsjotstellar
authored andcommitted
[ORC] Actually propagate memory unmapping errors on Windows
This fixes warnings like these: ../lib/ExecutionEngine/Orc/MemoryMapper.cpp:364:9: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result] joinErrors(std::move(Err), ^~~~~~~~~~ ~~~~~~~~~~~~~~~ Differential Revision: https://reviews.llvm.org/D131056 (cherry picked from commit 46bc1b5)
1 parent 853c8f9 commit bf95610

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/ExecutionEngine/Orc/MemoryMapper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,8 @@ void SharedMemoryMapper::release(ArrayRef<ExecutorAddr> Bases,
361361
#elif defined(_WIN32)
362362

363363
if (!UnmapViewOfFile(Reservations[Base].LocalAddr))
364-
joinErrors(std::move(Err),
365-
errorCodeToError(mapWindowsError(GetLastError())));
364+
Err = joinErrors(std::move(Err),
365+
errorCodeToError(mapWindowsError(GetLastError())));
366366

367367
#endif
368368

0 commit comments

Comments
 (0)