Skip to content

Commit

Permalink
tsan: fix Go runtime build with clang
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@213384 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
dvyukov committed Jul 18, 2014
1 parent c71b6b6 commit 9582d07
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/tsan/rtl/tsan_interface_atomic.cc
Expand Up @@ -32,8 +32,8 @@ typedef unsigned char a8;
typedef unsigned short a16; // NOLINT
typedef unsigned int a32;
typedef unsigned long long a64; // NOLINT
#if !defined(TSAN_GO) && defined(__SIZEOF_INT128__) \
|| (__clang_major__ * 100 + __clang_minor__ >= 302)
#if !defined(TSAN_GO) && (defined(__SIZEOF_INT128__) \
|| (__clang_major__ * 100 + __clang_minor__ >= 302))
__extension__ typedef __int128 a128;
# define __TSAN_HAS_INT128 1
#else
Expand Down Expand Up @@ -234,7 +234,7 @@ static T NoTsanAtomicLoad(const volatile T *a, morder mo) {
return atomic_load(to_atomic(a), to_mo(mo));
}

#if __TSAN_HAS_INT128
#if __TSAN_HAS_INT128 && !defined(TSAN_GO)
static a128 NoTsanAtomicLoad(const volatile a128 *a, morder mo) {
SpinMutexLock lock(&mutex128);
return *a;
Expand Down Expand Up @@ -264,7 +264,7 @@ static void NoTsanAtomicStore(volatile T *a, T v, morder mo) {
atomic_store(to_atomic(a), v, to_mo(mo));
}

#if __TSAN_HAS_INT128
#if __TSAN_HAS_INT128 && !defined(TSAN_GO)
static void NoTsanAtomicStore(volatile a128 *a, a128 v, morder mo) {
SpinMutexLock lock(&mutex128);
*a = v;
Expand Down

0 comments on commit 9582d07

Please sign in to comment.