[llvm] 46bc1b5 - [ORC] Actually propagate memory unmapping errors on Windows

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 4 01:15:51 PDT 2022


Author: Martin Storsjö
Date: 2022-08-04T11:14:52+03:00
New Revision: 46bc1b5689e417d870c57a8d16044a55549673fa

URL: https://github.com/llvm/llvm-project/commit/46bc1b5689e417d870c57a8d16044a55549673fa
DIFF: https://github.com/llvm/llvm-project/commit/46bc1b5689e417d870c57a8d16044a55549673fa.diff

LOG: [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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/ExecutionEngine/Orc/MemoryMapper.cpp b/llvm/lib/ExecutionEngine/Orc/MemoryMapper.cpp
index fdfdffca0124c..ee92e5191b507 100644
--- a/llvm/lib/ExecutionEngine/Orc/MemoryMapper.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/MemoryMapper.cpp
@@ -361,8 +361,8 @@ void SharedMemoryMapper::release(ArrayRef<ExecutorAddr> Bases,
 #elif defined(_WIN32)
 
       if (!UnmapViewOfFile(Reservations[Base].LocalAddr))
-        joinErrors(std::move(Err),
-                   errorCodeToError(mapWindowsError(GetLastError())));
+        Err = joinErrors(std::move(Err),
+                         errorCodeToError(mapWindowsError(GetLastError())));
 
 #endif
 


        


More information about the llvm-commits mailing list