Revert "[examples] Fix SectionMemoryManager deconstruction error with MSVC."
authorLang Hames <lhames@gmail.com>
Fri, 17 Sep 2021 07:42:25 +0000 (17:42 +1000)
committerLang Hames <lhames@gmail.com>
Fri, 17 Sep 2021 07:42:25 +0000 (17:42 +1000)
This reverts commit 63838d88145feaeb839efff8f40ab1e98597e423, which broke tests
on some bots. See e.g. https://lab.llvm.org/buildbot#builders/109/builds/22561

llvm/lib/ExecutionEngine/SectionMemoryManager.cpp

index 9a1fb31..6690dd0 100644 (file)
@@ -13,7 +13,6 @@
 
 #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"
 
@@ -265,10 +264,10 @@ public:
   }
 };
 
-ManagedStatic<DefaultMMapper> DefaultMMapperInstance;
+DefaultMMapper DefaultMMapperInstance;
 } // namespace
 
 SectionMemoryManager::SectionMemoryManager(MemoryMapper *MM)
-    : MMapper(MM ? *MM : *DefaultMMapperInstance) {}
+    : MMapper(MM ? *MM : DefaultMMapperInstance) {}
 
 } // namespace llvm