[PATCH] D131056: [ORC] Actually propagate memory unmapping errors on Windows

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 3 01:09:58 PDT 2022


mstorsjo created this revision.
mstorsjo added reviewers: lhames, sgraenitz, argentite.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
mstorsjo requested review of this revision.
Herald added a project: LLVM.

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),
          ^~~~~~~~~~ ~~~~~~~~~~~~~~~


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D131056

Files:
  llvm/lib/ExecutionEngine/Orc/MemoryMapper.cpp


Index: llvm/lib/ExecutionEngine/Orc/MemoryMapper.cpp
===================================================================
--- llvm/lib/ExecutionEngine/Orc/MemoryMapper.cpp
+++ llvm/lib/ExecutionEngine/Orc/MemoryMapper.cpp
@@ -361,8 +361,8 @@
 #elif defined(_WIN32)
 
       if (!UnmapViewOfFile(Reservations[Base].LocalAddr))
-        joinErrors(std::move(Err),
-                   errorCodeToError(mapWindowsError(GetLastError())));
+        Err = joinErrors(std::move(Err),
+                         errorCodeToError(mapWindowsError(GetLastError())));
 
 #endif
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131056.449574.patch
Type: text/x-patch
Size: 565 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220803/2120f127/attachment.bin>


More information about the llvm-commits mailing list