[llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp

Chris Lattner sabre at nondot.org
Thu Nov 9 11:32:28 PST 2006



Changes in directory llvm/lib/ExecutionEngine/JIT:

JITEmitter.cpp updated: 1.117 -> 1.118
---
Log message:

if lazy compilation is disabled, print an error message and abort if 
lazy compilation is ever attempted


---
Diffs of the changes:  (+7 -0)

 JITEmitter.cpp |    7 +++++++
 1 files changed, 7 insertions(+)


Index: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp
diff -u llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.117 llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.118
--- llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.117	Thu Nov  2 14:25:49 2006
+++ llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp	Thu Nov  9 13:32:13 2006
@@ -613,6 +613,13 @@
          "This is not a known stub!");
   Function *F = (--I)->second;
 
+  // If disabled, emit a useful error message and abort.
+  if (TheJIT->isLazyCompilationDisabled()) {
+    std::cerr << "LLVM JIT requested to do lazy compilation of function '"
+              << F->getName() << "' when lazy compiles are disabled!\n";
+    abort();
+  }
+  
   // We might like to remove the stub from the StubToFunction map.
   // We can't do that! Multiple threads could be stuck, waiting to acquire the
   // lock above. As soon as the 1st function finishes compiling the function,






More information about the llvm-commits mailing list