The MCJIT memory manager needs to initialize its Module member.

llvm-svn: 131234
This commit is contained in:
Jim Grosbach 2011-05-12 18:21:23 +00:00
parent e50a3d16e9
commit 9efe39ea38
2 changed files with 2 additions and 2 deletions

View 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)

View 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