From fe854034677f59baca1e38075e71f6efca247a03 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 16 Aug 2006 01:24:12 +0000 Subject: initial changes to support JIT'ing from multiple module providers, implicitly linking the program on the fly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29721 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ExecutionEngine/ExecutionEngine.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'include/llvm/ExecutionEngine') diff --git a/include/llvm/ExecutionEngine/ExecutionEngine.h b/include/llvm/ExecutionEngine/ExecutionEngine.h index 2a117f53be..59666743de 100644 --- a/include/llvm/ExecutionEngine/ExecutionEngine.h +++ b/include/llvm/ExecutionEngine/ExecutionEngine.h @@ -20,6 +20,7 @@ #include #include #include "llvm/System/Mutex.h" +#include "llvm/ADT/SmallVector.h" namespace llvm { @@ -60,14 +61,13 @@ public: class ExecutionEngine { - Module &CurMod; const TargetData *TD; - ExecutionEngineState state; - protected: - ModuleProvider *MP; - + /// 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. + SmallVector Modules; + void setTargetData(const TargetData *td) { TD = td; } @@ -88,9 +88,14 @@ public: ExecutionEngine(Module *M); virtual ~ExecutionEngine(); - Module &getModule() const { return CurMod; } + //Module &getModule() const { return CurMod; } const TargetData *getTargetData() const { return TD; } + /// 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. + Function *FindFunctionNamed(const char *FnName); + /// create - This is the factory method for creating an execution engine which /// is appropriate for the current machine. static ExecutionEngine *create(ModuleProvider *MP, -- cgit v1.2.3