diff options
| author | Owen Anderson <resistor@mac.com> | 2009-05-20 19:01:50 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2009-05-20 19:01:50 +0000 |
| commit | 5b9400d6bd03f48f135d2bcce2965e273c44a3a4 (patch) | |
| tree | c2dce5ddf294d277e66d4ca706984cb06ccfd039 /llvm | |
| parent | 895ef6e6f918c1a741c1eea88e610c205a454f07 (diff) | |
| download | bcm5719-llvm-5b9400d6bd03f48f135d2bcce2965e273c44a3a4.tar.gz bcm5719-llvm-5b9400d6bd03f48f135d2bcce2965e273c44a3a4.zip | |
I just fail today.
Hopefully this fixes the last build errors on systems with GCC < 4.1.
llvm-svn: 72179
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/System/Atomic.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/System/Atomic.cpp b/llvm/lib/System/Atomic.cpp index e720385e5f0..eee90e22917 100644 --- a/llvm/lib/System/Atomic.cpp +++ b/llvm/lib/System/Atomic.cpp @@ -38,9 +38,9 @@ sys::cas_flag sys::CompareAndSwap(volatile sys::cas_flag* ptr, sys::cas_flag new_value, sys::cas_flag old_value) { #if LLVM_MULTITHREADED==0 - sys::cas_flag result = *dest; - if (result == c) - *dest = exc; + sys::cas_flag result = *ptr; + if (result == old_value) + *ptr = new_value; return result; #elif defined(__GNUC__) return __sync_val_compare_and_swap(ptr, old_value, new_value); |

