add a way to have multiple modules in a JIT :)
authorChris Lattner <sabre@nondot.org>
Wed, 16 Aug 2006 02:53:27 +0000 (02:53 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 16 Aug 2006 02:53:27 +0000 (02:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29723 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ExecutionEngine/ExecutionEngine.h

index 59666743deaa1c7779af3b513c47457e609368a3..828cd3a962d04963b9089ba242f516a64da89765 100644 (file)
@@ -88,9 +88,15 @@ public:
   ExecutionEngine(Module *M);
   virtual ~ExecutionEngine();
 
-  //Module &getModule() const { return CurMod; }
   const TargetData *getTargetData() const { return TD; }
 
+  /// addModuleProvider - Add a ModuleProvider to the list of modules that we
+  /// can JIT from.  Note that this takes ownership of the ModuleProvider: when
+  /// the ExecutionEngine is destroyed, it destroys the MP as well.
+  void addModuleProvider(ModuleProvider *P) {
+    Modules.push_back(P);
+  }
+  
   /// FindFunctionNamed - Search all of the active modules to find the one that
   /// defines FnName.  This is very slow operation and shouldn't be used for
   /// general code.