[llvm-commits] [llvm] r71819 - in /llvm/trunk/include/llvm: Support/ManagedStatic.h System/Atomic.h

Owen Anderson resistor at mac.com
Thu May 14 17:01:40 PDT 2009


Author: resistor
Date: Thu May 14 19:01:40 2009
New Revision: 71819

URL: http://llvm.org/viewvc/llvm-project?rev=71819&view=rev
Log:
Now with working on Leopard!

Modified:
    llvm/trunk/include/llvm/Support/ManagedStatic.h
    llvm/trunk/include/llvm/System/Atomic.h

Modified: llvm/trunk/include/llvm/Support/ManagedStatic.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/ManagedStatic.h?rev=71819&r1=71818&r2=71819&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Support/ManagedStatic.h (original)
+++ llvm/trunk/include/llvm/Support/ManagedStatic.h Thu May 14 19:01:40 2009
@@ -28,7 +28,7 @@
 /// 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.

Modified: llvm/trunk/include/llvm/System/Atomic.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/System/Atomic.h?rev=71819&r1=71818&r2=71819&view=diff

==============================================================================
--- llvm/trunk/include/llvm/System/Atomic.h (original)
+++ llvm/trunk/include/llvm/System/Atomic.h Thu May 14 19:01:40 2009
@@ -55,10 +55,10 @@
       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)





More information about the llvm-commits mailing list