Fix compilation error on Windows (MSVC doesn't support m_AtExitFuncsSpinLock = ATOMIC_FLAG_INIT; in the class definition)
This commit is contained in:
parent
1508b73c7c
commit
4d4a4b1270
@ -50,6 +50,9 @@ IncrementalExecutor::IncrementalExecutor(clang::DiagnosticsEngine& diags):
|
||||
#endif
|
||||
{
|
||||
|
||||
// MSVC doesn't support m_AtExitFuncsSpinLock=ATOMIC_FLAG_INIT; in the class definition
|
||||
std::atomic_flag_clear( &m_AtExitFuncsSpinLock );
|
||||
|
||||
// No need to protect this access of m_AtExitFuncs, since nobody
|
||||
// can use this object yet.
|
||||
m_AtExitFuncs.reserve(256);
|
||||
|
@ -96,7 +96,7 @@ namespace cling {
|
||||
/// and before the calling framework has any change of taking back/again
|
||||
/// its lock protecting the access to cling, so we need to explicit protect
|
||||
/// again multiple conccurent access.
|
||||
std::atomic_flag m_AtExitFuncsSpinLock = ATOMIC_FLAG_INIT;
|
||||
std::atomic_flag m_AtExitFuncsSpinLock; // MSVC doesn't support = ATOMIC_FLAG_INIT;
|
||||
|
||||
typedef llvm::SmallVector<CXAAtExitElement, 128> AtExitFunctions;
|
||||
///\brief Static object, which are bound to unloading of certain declaration
|
||||
|
Loading…
x
Reference in New Issue
Block a user