The MCJIT memory manager needs to initialize its Module member.
authorJim Grosbach <grosbach@apple.com>
Thu, 12 May 2011 18:21:23 +0000 (18:21 +0000)
committerJim Grosbach <grosbach@apple.com>
Thu, 12 May 2011 18:21:23 +0000 (18:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131234 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/MCJIT/MCJIT.cpp
lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h

index 3d4ee369ead00b04374f8494f71721f40f169876..7230291576e95b9aea23a40044443f514cf47e95 100644 (file)
@@ -58,7 +58,7 @@ ExecutionEngine *MCJIT::createJIT(Module *M,
 
   // If the target supports JIT code generation, create the JIT.
   if (TargetJITInfo *TJ = TM->getJITInfo())
-    return new MCJIT(M, TM, *TJ, new MCJITMemoryManager(JMM), OptLevel,
+    return new MCJIT(M, TM, *TJ, new MCJITMemoryManager(JMM, M), OptLevel,
                      GVsWithCode);
 
   if (ErrorStr)
index e3c6fda63b487d68b081c2d3e30a5d3892b154dc..6cc89e057a99f2dd66b7d0b3703cc679854d4b6c 100644 (file)
@@ -26,7 +26,7 @@ class MCJITMemoryManager : public RTDyldMemoryManager {
   // FIXME: Multiple modules.
   Module *M;
 public:
-  MCJITMemoryManager(JITMemoryManager *jmm) : JMM(jmm) {}
+  MCJITMemoryManager(JITMemoryManager *jmm, Module *m) : JMM(jmm), M(m) {}
 
   // Allocate ActualSize bytes, or more, for the named function. Return
   // a pointer to the allocated memory and update Size to reflect how much