summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Mutex.cpp
diff options
context:
space:
mode:
authorSerge Pavlov <sepavloff@gmail.com>2018-05-29 07:05:41 +0000
committerSerge Pavlov <sepavloff@gmail.com>2018-05-29 07:05:41 +0000
commit1a095524f29c2861e47d181c83532211d32f6846 (patch)
treef1f335f75e6ab265fa1c7e4882b2aa37bd50ba0a /llvm/lib/Support/Mutex.cpp
parent335fa1eb04a011a6f174a82947efe6c8c3a4cd88 (diff)
downloadbcm5719-llvm-1a095524f29c2861e47d181c83532211d32f6846.tar.gz
bcm5719-llvm-1a095524f29c2861e47d181c83532211d32f6846.zip
Reverted commits 333390, 333391 and 333394
Build of shared library LLVMDemangle.so fails due to dependency problem. llvm-svn: 333395
Diffstat (limited to 'llvm/lib/Support/Mutex.cpp')
-rw-r--r--llvm/lib/Support/Mutex.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Support/Mutex.cpp b/llvm/lib/Support/Mutex.cpp
index 7138c7a4b98..c70125f108e 100644
--- a/llvm/lib/Support/Mutex.cpp
+++ b/llvm/lib/Support/Mutex.cpp
@@ -47,7 +47,10 @@ MutexImpl::MutexImpl( bool recursive)
{
// Declare the pthread_mutex data structures
pthread_mutex_t* mutex =
- static_cast<pthread_mutex_t*>(safe_malloc(sizeof(pthread_mutex_t)));
+ static_cast<pthread_mutex_t*>(malloc(sizeof(pthread_mutex_t)));
+
+ if (mutex == nullptr)
+ report_bad_alloc_error("Mutex allocation failed");
pthread_mutexattr_t attr;
OpenPOWER on IntegriCloud