Removing the static destructor from ManagedStatic.cpp by controlling the allocation...
authorChris Bieneman <beanz@apple.com>
Mon, 13 Oct 2014 22:37:25 +0000 (22:37 +0000)
committerChris Bieneman <beanz@apple.com>
Mon, 13 Oct 2014 22:37:25 +0000 (22:37 +0000)
commit3a143ce2e79a7a7a12981f2d13ea771ff31ff888
tree99570e77a335a1a73f01af60ab7a037805f780f6
parent5db6cf4884eee68c28df5aa7243e75236814a7a3
Removing the static destructor from ManagedStatic.cpp by controlling the allocation and de-allocation of the mutex.

This patch adds a new llvm_call_once function which is used by the ManagedStatic implementation to safely initialize a global to avoid static construction and destruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219638 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/Threading.h
lib/Support/ManagedStatic.cpp