allow clients to indicate that they never want lazy compilation.
authorChris Lattner <sabre@nondot.org>
Thu, 9 Nov 2006 19:30:47 +0000 (19:30 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 9 Nov 2006 19:30:47 +0000 (19:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31600 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ExecutionEngine/ExecutionEngine.h

index 828cd3a962d04963b9089ba242f516a64da89765..c2f8fed70dfe5ed8608273fe0b6aa368e3665c5d 100644 (file)
@@ -63,6 +63,7 @@ public:
 class ExecutionEngine {
   const TargetData *TD;
   ExecutionEngineState state;
+  bool LazyCompilationDisabled;
 protected:
   /// Modules - This is a list of ModuleProvider's that we are JIT'ing from.  We
   /// use a smallvector to optimize for the case where there is only one module.
@@ -197,6 +198,15 @@ public:
   virtual void *getOrEmitGlobalVariable(const GlobalVariable *GV) {
     return getPointerToGlobal((GlobalValue*)GV);
   }
+  
+  /// DisableLazyCompilation - If called, the JIT will abort if lazy compilation
+  // is ever attempted.
+  void DisableLazyCompilation() {
+    LazyCompilationDisabled = true;
+  }
+  bool isLazyCompilationDisabled() const {
+    return LazyCompilationDisabled;
+  }
 
 protected:
   void emitGlobals();