[llvm-commits] [llvm] r41050 - /llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp

Chris Lattner sabre at nondot.org
Mon Aug 13 13:08:17 PDT 2007


Author: lattner
Date: Mon Aug 13 15:08:16 2007
New Revision: 41050

URL: http://llvm.org/viewvc/llvm-project?rev=41050&view=rev
Log:
move assertion into mutex guard, a partial fix for PR1606.

Modified:
    llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp

Modified: llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp?rev=41050&r1=41049&r2=41050&view=diff

==============================================================================
--- llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp Mon Aug 13 15:08:16 2007
@@ -238,9 +238,9 @@
 ///
 void JIT::runJITOnFunction(Function *F) {
   static bool isAlreadyCodeGenerating = false;
-  assert(!isAlreadyCodeGenerating && "Error: Recursive compilation detected!");
 
   MutexGuard locked(lock);
+  assert(!isAlreadyCodeGenerating && "Error: Recursive compilation detected!");
 
   // JIT the function
   isAlreadyCodeGenerating = true;





More information about the llvm-commits mailing list