From 44d423ac93bda643d271c7767a369db6d0aa281d Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Sun, 6 Sep 2009 10:53:22 +0000 Subject: Tweak code into an equivalent form for which icc doesn't warn about unreachable instructions. Patch by Erick Tryzelaar (#111). llvm-svn: 81110 --- llvm/lib/System/RWMutex.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'llvm/lib/System/RWMutex.cpp') diff --git a/llvm/lib/System/RWMutex.cpp b/llvm/lib/System/RWMutex.cpp index 15d98cb8f41..5faf220eb91 100644 --- a/llvm/lib/System/RWMutex.cpp +++ b/llvm/lib/System/RWMutex.cpp @@ -117,8 +117,7 @@ RWMutexImpl::reader_acquire() int errorcode = pthread_rwlock_rdlock(rwlock); return errorcode == 0; - } - return false; + } else return false; } bool @@ -131,8 +130,7 @@ RWMutexImpl::reader_release() int errorcode = pthread_rwlock_unlock(rwlock); return errorcode == 0; - } - return false; + } else return false; } bool @@ -145,8 +143,7 @@ RWMutexImpl::writer_acquire() int errorcode = pthread_rwlock_wrlock(rwlock); return errorcode == 0; - } - return false; + } else return false; } bool @@ -159,8 +156,7 @@ RWMutexImpl::writer_release() int errorcode = pthread_rwlock_unlock(rwlock); return errorcode == 0; - } - return false; + } else return false; } } -- cgit v1.2.3