diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-12-28 19:44:52 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-12-31 20:15:03 -0800 |
| commit | c22fed9424a907beab53f6c6cd54afeff039f1b3 (patch) | |
| tree | 36917eae31e165819adbdff2d9aea95b3c3073a8 /src/rustllvm/RustWrapper.cpp | |
| parent | f3370295b738c8b4c80fa8fc8449c0c3545b1b35 (diff) | |
| download | rust-c22fed9424a907beab53f6c6cd54afeff039f1b3.tar.gz rust-c22fed9424a907beab53f6c6cd54afeff039f1b3.zip | |
Convert relevant static mutexes to Once
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
| -rw-r--r-- | src/rustllvm/RustWrapper.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp index d66f90a5352..335c7b2c65b 100644 --- a/src/rustllvm/RustWrapper.cpp +++ b/src/rustllvm/RustWrapper.cpp @@ -149,28 +149,6 @@ extern "C" LLVMValueRef LLVMInlineAsm(LLVMTypeRef Ty, IsAlignStack, (InlineAsm::AsmDialect) Dialect)); } -/** - * This function is intended to be a threadsafe interface into enabling a - * multithreaded LLVM. This is invoked at the start of the translation phase of - * compilation to ensure that LLVM is ready. - * - * All of trans properly isolates LLVM with the use of a different - * LLVMContextRef per task, thus allowing parallel compilation of different - * crates in the same process. At the time of this writing, the use case for - * this is unit tests for rusti, but there are possible other applications. - */ -extern "C" bool LLVMRustStartMultithreading() { - static Mutex lock; - bool ret = true; - assert(lock.acquire()); - if (!LLVMIsMultithreaded()) { - ret = LLVMStartMultithreaded(); - } - assert(lock.release()); - return ret; -} - - typedef DIBuilder* DIBuilderRef; template<typename DIT> |
