[examples] Fix SectionMemoryManager deconstruction error with MSVC.
This commit fixes an order-of-initialization issue: If the default mmapper object is destroyed while some global SectionMemoryManager is still using it then calls to the mapper from ~SectionMemoryManager will fail. This issue was causing failures when running the LLVM Kaleidoscope examples on windows. Switching to a ManagedStatic solves the initialization order issue. Patch by Justice Adams. Thanks Justice! Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D107087
Loading
Please register or sign in to comment