Enabling incremental bytecode loading in the JIT:
* The VM is now constructed with a ModuleProvider


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9125 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/ExecutionEngine/JIT/VM.cpp b/lib/ExecutionEngine/JIT/VM.cpp
index ee7e311..622215b 100644
--- a/lib/ExecutionEngine/JIT/VM.cpp
+++ b/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());