summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Logan Chien <loganchien@google.com> 2012-04-23 00:14:45 +0800
committer Shih-wei Liao <sliao@google.com> 2012-04-22 11:51:54 -0700
commit80cd474be3aa348ce7c73efdda994b4e46840a2c (patch)
tree94844ca030e35f0ea19f56a5e9afb7a76f238146
parentb4e6fff1ecc8853f4ca6dadcca5151cac84048db (diff)
Fix unit test by holding compiler_lock_ on ourselves.
Because in previous CL, we removed the MutexLock in the Materialize for parallel compilation, we don't hold the lock before we call LoadElfFromCompilationUnit anymore. Thus, we have to acquire for the lock in LoadElfFromCompilationUnit. Change-Id: Ia1b059bdffafc54a473820244bcfcfc634771061
-rw-r--r--src/compiler_llvm/compiler_llvm.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler_llvm/compiler_llvm.cc b/src/compiler_llvm/compiler_llvm.cc
index 2ebf5f65f7..1623b2cef5 100644
--- a/src/compiler_llvm/compiler_llvm.cc
+++ b/src/compiler_llvm/compiler_llvm.cc
@@ -216,7 +216,7 @@ void CompilerLLVM::EnableAutoElfLoading() {
void CompilerLLVM::LoadElfFromCompilationUnit(const CompilationUnit* cunit) {
- compiler_lock_.AssertHeld();
+ MutexLock GUARD(compiler_lock_);
DCHECK(cunit->IsMaterialized()) << cunit->GetElfIndex();
if (!elf_loader_->LoadElfAt(cunit->GetElfIndex(),