diff options
author | Eric Fiselier <eric@efcs.ca> | 2017-03-04 01:02:35 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2017-03-04 01:02:35 +0000 |
commit | 6aa4f1d1af27077ea3ff0ac3f2f1b3bdca2bcc60 (patch) | |
tree | ba7529585f9ccd730fccb1b2924c0f7148985201 /libcxxabi/src/cxa_guard.cpp | |
parent | 0350a87ce30fac3b7c038ff5417b39ebaf0baf6e (diff) | |
download | bcm5719-llvm-6aa4f1d1af27077ea3ff0ac3f2f1b3bdca2bcc60.tar.gz bcm5719-llvm-6aa4f1d1af27077ea3ff0ac3f2f1b3bdca2bcc60.zip |
Turn on -Wunused-function and cleanup occurances
llvm-svn: 296936
Diffstat (limited to 'libcxxabi/src/cxa_guard.cpp')
-rw-r--r-- | libcxxabi/src/cxa_guard.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/libcxxabi/src/cxa_guard.cpp b/libcxxabi/src/cxa_guard.cpp index 49f83ede593..f225dbc1049 100644 --- a/libcxxabi/src/cxa_guard.cpp +++ b/libcxxabi/src/cxa_guard.cpp @@ -113,9 +113,10 @@ set_lock(uint64_t& x, lock_type y) typedef bool lock_type; -inline -lock_type -get_lock(uint64_t x) +#if !defined(__arm__) +static_assert(std::is_same<guard_type, uint64_t>::value, ""); + +inline lock_type get_lock(uint64_t x) { union { @@ -125,9 +126,7 @@ get_lock(uint64_t x) return f.lock[1] != 0; } -inline -void -set_lock(uint64_t& x, lock_type y) +inline void set_lock(uint64_t& x, lock_type y) { union { @@ -137,10 +136,10 @@ set_lock(uint64_t& x, lock_type y) f.lock[1] = y; x = f.guard; } +#else // defined(__arm__) +static_assert(std::is_same<guard_type, uint32_t>::value, ""); -inline -lock_type -get_lock(uint32_t x) +inline lock_type get_lock(uint32_t x) { union { @@ -150,9 +149,7 @@ get_lock(uint32_t x) return f.lock[1] != 0; } -inline -void -set_lock(uint32_t& x, lock_type y) +inline void set_lock(uint32_t& x, lock_type y) { union { @@ -163,7 +160,9 @@ set_lock(uint32_t& x, lock_type y) x = f.guard; } -#endif // __APPLE__ +#endif // !defined(__arm__) + +#endif // __APPLE__ && !__arm__ } // unnamed namespace |