[PATCH] D107087: Fix SectionMemoryManager deconstruction error with MSVC
Lang Hames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 16 23:58:45 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG63838d88145f: [examples] Fix SectionMemoryManager deconstruction error with MSVC. (authored by lhames).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107087/new/
https://reviews.llvm.org/D107087
Files:
llvm/lib/ExecutionEngine/SectionMemoryManager.cpp
Index: llvm/lib/ExecutionEngine/SectionMemoryManager.cpp
===================================================================
--- llvm/lib/ExecutionEngine/SectionMemoryManager.cpp
+++ llvm/lib/ExecutionEngine/SectionMemoryManager.cpp
@@ -13,6 +13,7 @@
#include "llvm/ExecutionEngine/SectionMemoryManager.h"
#include "llvm/Config/config.h"
+#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/Process.h"
@@ -264,10 +265,10 @@
}
};
-DefaultMMapper DefaultMMapperInstance;
+ManagedStatic<DefaultMMapper> DefaultMMapperInstance;
} // namespace
SectionMemoryManager::SectionMemoryManager(MemoryMapper *MM)
- : MMapper(MM ? *MM : DefaultMMapperInstance) {}
+ : MMapper(MM ? *MM : *DefaultMMapperInstance) {}
} // namespace llvm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107087.373151.patch
Type: text/x-patch
Size: 796 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210917/e62b1a3b/attachment.bin>
More information about the llvm-commits
mailing list