[PATCH] D107087: Fix SectionMemoryManager deconstruction error with MSVC
Justice Adams via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 14 17:17:51 PDT 2021
justice_adams updated this revision to Diff 372596.
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.372596.patch
Type: text/x-patch
Size: 796 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210915/464b3caa/attachment.bin>
More information about the llvm-commits
mailing list