aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-05-20 21:03:06 +0000
committerOwen Anderson <resistor@mac.com>2009-05-20 21:03:06 +0000
commit6afe2fa28816b5b208a0140372900325709271c4 (patch)
treeb7b8d9723b2b6dec81f4a27d4ee7a128b92c2019 /lib/Support
parent2aa783b2e716e7e3190e670208ec45caac196599 (diff)
downloadexternal_llvm-6afe2fa28816b5b208a0140372900325709271c4.zip
external_llvm-6afe2fa28816b5b208a0140372900325709271c4.tar.gz
external_llvm-6afe2fa28816b5b208a0140372900325709271c4.tar.bz2
Have llvm_start_multithreaded return a bool indicating whether multithreaded
initialization succeeded or not, rather than just asserting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72182 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r--lib/Support/ManagedStatic.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Support/ManagedStatic.cpp b/lib/Support/ManagedStatic.cpp
index 056b6c0..a3b2bcc 100644
--- a/lib/Support/ManagedStatic.cpp
+++ b/lib/Support/ManagedStatic.cpp
@@ -68,12 +68,13 @@ void ManagedStaticBase::destroy() const {
DeleterFn = 0;
}
-void llvm::llvm_start_multithreaded() {
+bool llvm::llvm_start_multithreaded() {
#if LLVM_MULTITHREADED
assert(ManagedStaticMutex == 0 && "Multithreaded LLVM already initialized!");
ManagedStaticMutex = new sys::Mutex(true);
+ return true;
#else
- assert(0 && "LLVM built without multithreading support!");
+ return false;
#endif
}