[llvm-commits] [compiler-rt] r171955 - /compiler-rt/trunk/lib/ubsan/ubsan_value.h

Will Dietz wdietz2 at illinois.edu
Tue Jan 8 22:18:41 PST 2013


Author: wdietz2
Date: Wed Jan  9 00:18:40 2013
New Revision: 171955

URL: http://llvm.org/viewvc/llvm-project?rev=171955&view=rev
Log:
[ubsan] Drop use of __atomic_exchange_n for now to fix build for some.

Need a more reliable way to check for support of this intrinsic.

Modified:
    compiler-rt/trunk/lib/ubsan/ubsan_value.h

Modified: compiler-rt/trunk/lib/ubsan/ubsan_value.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/ubsan_value.h?rev=171955&r1=171954&r2=171955&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/ubsan_value.h (original)
+++ compiler-rt/trunk/lib/ubsan/ubsan_value.h Wed Jan  9 00:18:40 2013
@@ -64,13 +64,7 @@
   /// \brief Atomically acquire a copy, disabling original in-place.
   /// Exactly one call to acquire() returns a copy that isn't disabled.
   SourceLocation acquire() {
-#ifdef __ATOMIC_RELAXED
-    // Use weaker ordering if available (relaxed/monotonic)
-    u32 OldColumn = __atomic_exchange_n(&Column, ~u32(0), __ATOMIC_RELAXED);
-#else
-    // Otherwise, do a TAS which has acquire semantics, stronger than needed.
     u32 OldColumn = __sync_lock_test_and_set(&Column, ~u32(0));
-#endif
     return SourceLocation(Filename, Line, OldColumn);
   }
 





More information about the llvm-commits mailing list