Enabling incremental bytecode loading in the JIT:
* The VM is now constructed with a ModuleProvider
llvm-svn: 9125
diff --git a/llvm/lib/ExecutionEngine/JIT/VM.cpp b/llvm/lib/ExecutionEngine/JIT/VM.cpp
index ee7e311e..622215b 100644
--- a/llvm/lib/ExecutionEngine/JIT/VM.cpp
+++ b/llvm/lib/ExecutionEngine/JIT/VM.cpp
@@ -43,6 +43,9 @@
void *&Addr = GlobalAddress[F]; // Function already code gen'd
if (Addr) return Addr;
+ // Make sure we read in the function if it exists in this Module
+ MP->materializeFunction(F);
+
if (F->isExternal())
return Addr = getPointerToNamedFunction(F->getName());