aboutsummaryrefslogtreecommitdiffstats
path: root/lib/System/RWMutex.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2009-09-06 10:53:22 +0000
committerDuncan Sands <baldrick@free.fr>2009-09-06 10:53:22 +0000
commit3872b7ec9730d0492e40ab8c279dd8d397d71d42 (patch)
tree5162422a9c3a3699644b9f34b51fb80fa07b18d5 /lib/System/RWMutex.cpp
parenta118e65f108d5222f359ff32d24a27bdcaf27eb1 (diff)
downloadexternal_llvm-3872b7ec9730d0492e40ab8c279dd8d397d71d42.tar.gz
external_llvm-3872b7ec9730d0492e40ab8c279dd8d397d71d42.tar.bz2
external_llvm-3872b7ec9730d0492e40ab8c279dd8d397d71d42.zip
Tweak code into an equivalent form for which icc
doesn't warn about unreachable instructions. Patch by Erick Tryzelaar (#111). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81110 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/RWMutex.cpp')
-rw-r--r--lib/System/RWMutex.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/System/RWMutex.cpp b/lib/System/RWMutex.cpp
index 15d98cb8f4..5faf220eb9 100644
--- a/lib/System/RWMutex.cpp
+++ b/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;
}
}