summaryrefslogtreecommitdiffstats
path: root/runtime/atomic.h
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2014-11-03 23:41:03 -0800
committerAndreas Gampe <agampe@google.com>2014-11-03 23:41:03 -0800
commit575e78c41ece0dec969d31f46be563d4eb7ae43b (patch)
tree16906df0ba0912a6cb01b3139ba7c60d5f9d09b7 /runtime/atomic.h
parent2998e9cdc9f19c30c4944a4726ed9f147de79ebd (diff)
downloadart-575e78c41ece0dec969d31f46be563d4eb7ae43b.zip
art-575e78c41ece0dec969d31f46be563d4eb7ae43b.tar.gz
art-575e78c41ece0dec969d31f46be563d4eb7ae43b.tar.bz2
ART: Replace COMPILE_ASSERT with static_assert (runtime)
Replace all occurrences of COMPILE_ASSERT in the runtime tree. Change-Id: I01e420899c760094fb342cc6cb9e692dd670a0b2
Diffstat (limited to 'runtime/atomic.h')
-rw-r--r--runtime/atomic.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/runtime/atomic.h b/runtime/atomic.h
index e57c0c0..cf61277 100644
--- a/runtime/atomic.h
+++ b/runtime/atomic.h
@@ -293,17 +293,17 @@ class PACKED(sizeof(T)) Atomic : public std::atomic<T> {
typedef Atomic<int32_t> AtomicInteger;
-COMPILE_ASSERT(sizeof(AtomicInteger) == sizeof(int32_t), weird_atomic_int_size);
-COMPILE_ASSERT(alignof(AtomicInteger) == alignof(int32_t),
- atomic_int_alignment_differs_from_that_of_underlying_type);
-COMPILE_ASSERT(sizeof(Atomic<int64_t>) == sizeof(int64_t), weird_atomic_int64_size);
+static_assert(sizeof(AtomicInteger) == sizeof(int32_t), "Weird AtomicInteger size");
+static_assert(alignof(AtomicInteger) == alignof(int32_t),
+ "AtomicInteger alignment differs from that of underlyingtype");
+static_assert(sizeof(Atomic<int64_t>) == sizeof(int64_t), "Weird Atomic<int64> size");
// Assert the alignment of 64-bit integers is 64-bit. This isn't true on certain 32-bit
// architectures (e.g. x86-32) but we know that 64-bit integers here are arranged to be 8-byte
// aligned.
#if defined(__LP64__)
- COMPILE_ASSERT(alignof(Atomic<int64_t>) == alignof(int64_t),
- atomic_int64_alignment_differs_from_that_of_underlying_type);
+ static_assert(alignof(Atomic<int64_t>) == alignof(int64_t),
+ "Atomic<int64> alignment differs from that of underlying type");
#endif
} // namespace art