[compiler-rt] r305899 - [mips][compiler-rt] Fix build breakage.
Simon Dardis via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 21 04:29:15 PDT 2017
Author: sdardis
Date: Wed Jun 21 06:29:15 2017
New Revision: 305899
URL: http://llvm.org/viewvc/llvm-project?rev=305899&view=rev
Log:
[mips][compiler-rt] Fix build breakage.
Change some reinterpret_casts to c-style casts due to template instantiation
restrictions and build breakage due to missing paranthesises.
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_atomic_clang.h
compiler-rt/trunk/lib/sanitizer_common/sanitizer_atomic_clang_other.h
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_atomic_clang.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_atomic_clang.h?rev=305899&r1=305898&r2=305899&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_atomic_clang.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_atomic_clang.h Wed Jun 21 06:29:15 2017
@@ -82,8 +82,7 @@ INLINE bool atomic_compare_exchange_stro
if (sizeof(*a) == 8) {
Type volatile *val_ptr = const_cast<Type volatile *>(&a->val_dont_use);
prev = __mips_sync_val_compare_and_swap<u64>(
- reinterpret_cast<u64 volatile *>(val_ptr), reinterpret_cast<u64> cmpv,
- reinterpret_cast<u64> xchg);
+ reinterpret_cast<u64 volatile *>(val_ptr), (u64)cmpv, (u64)xchg);
} else {
prev = __sync_val_compare_and_swap(&a->val_dont_use, cmpv, xchg);
}
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_atomic_clang_other.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_atomic_clang_other.h?rev=305899&r1=305898&r2=305899&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_atomic_clang_other.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_atomic_clang_other.h Wed Jun 21 06:29:15 2017
@@ -145,8 +145,7 @@ INLINE void atomic_store(volatile T *a,
typename T::Type volatile *val_ptr =
const_cast<typename T::Type volatile *>(&a->val_dont_use);
cur = __mips_sync_val_compare_and_swap<u64>(
- reinterpret_cast<u64 volatile *>(val_ptr), reinterpret_cast<u64> cmp,
- reinterpret_cast<u64> v);
+ reinterpret_cast<u64 volatile *>(val_ptr), (u64)cmp, (u64)v);
#else
cur = __sync_val_compare_and_swap(&a->val_dont_use, cmp, v);
#endif
More information about the llvm-commits
mailing list