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/Mutex.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'llvm/lib/System/Mutex.cpp') diff --git a/llvm/lib/System/Mutex.cpp b/llvm/lib/System/Mutex.cpp index a5e9920ae3f..8ccd6e52c4d 100644 --- a/llvm/lib/System/Mutex.cpp +++ b/llvm/lib/System/Mutex.cpp @@ -115,8 +115,7 @@ MutexImpl::acquire() int errorcode = pthread_mutex_lock(mutex); return errorcode == 0; - } - return false; + } else return false; } bool @@ -129,8 +128,7 @@ MutexImpl::release() int errorcode = pthread_mutex_unlock(mutex); return errorcode == 0; - } - return false; + } else return false; } bool @@ -143,8 +141,7 @@ MutexImpl::tryacquire() int errorcode = pthread_mutex_trylock(mutex); return errorcode == 0; - } - return false; + } else return false; } } -- cgit v1.2.3