From 5f00b0c5b63c30c7ad6134543318551902de5c93 Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Fri, 15 May 2009 00:01:40 +0000 Subject: [PATCH] Now with working on Leopard! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71819 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/ManagedStatic.h | 2 +- include/llvm/System/Atomic.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/llvm/Support/ManagedStatic.h b/include/llvm/Support/ManagedStatic.h index 4c1271cec74..e6384c72135 100644 --- a/include/llvm/Support/ManagedStatic.h +++ b/include/llvm/Support/ManagedStatic.h @@ -28,7 +28,7 @@ void object_deleter(void *Ptr) { /// ManagedStaticBase - Common base class for ManagedStatic instances. class ManagedStaticBase { protected: - sys::cas_flag InitFlag; + mutable sys::cas_flag InitFlag; // This should only be used as a static variable, which guarantees that this // will be zero initialized. diff --git a/include/llvm/System/Atomic.h b/include/llvm/System/Atomic.h index 2f95e0f7fbb..c6d59531917 100644 --- a/include/llvm/System/Atomic.h +++ b/include/llvm/System/Atomic.h @@ -55,10 +55,10 @@ namespace llvm { OSMemoryBarrier(); } - typedef volatile UInt32 cas_flag; + typedef volatile int32_t cas_flag; inline cas_flag CompareAndSwap(cas_flag* dest, cas_flag exc, cas_flag c) { cas_flag old = *dest; - OSCompareAndSwap(c, exc, dest); + OSAtomicCompareAndSwap32(c, exc, dest); return old; } #elif defined(LLVM_ON_WIN32) -- 2.34.1