forked from OSchip/llvm-project
The MCJIT memory manager needs to initialize its Module member.
llvm-svn: 131234
This commit is contained in:
parent
e50a3d16e9
commit
9efe39ea38
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue