summaryrefslogtreecommitdiffstats
path: root/llvm/lib
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
commite147774b05dd0ff1dadfc23f0cd22ed8ffed872d (patch)
treef76ca0efd1639f5738977b0a99a9939ea4b76618 /llvm/lib
parentc902c85b6cf7d788c5f2f4bc6869e9c1afb44485 (diff)
downloadbcm5719-llvm-e147774b05dd0ff1dadfc23f0cd22ed8ffed872d.tar.gz
bcm5719-llvm-e147774b05dd0ff1dadfc23f0cd22ed8ffed872d.zip
Have llvm_start_multithreaded return a bool indicating whether multithreaded
initialization succeeded or not, rather than just asserting. llvm-svn: 72182
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Support/ManagedStatic.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Support/ManagedStatic.cpp b/llvm/lib/Support/ManagedStatic.cpp
index 056b6c06c1e..a3b2bcc66a9 100644
--- a/llvm/lib/Support/ManagedStatic.cpp
+++ b/llvm/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
}
OpenPOWER on IntegriCloud