llvm.org GIT mirror llvm / 3c2b0e1
ExceptionDemo: Corresponding to r181820, SectionMemoryManager should belong to RTDyldMemoryManager. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181844 91177308-0d34-0410-b5e6-96231b3b80d8 NAKAMURA Takumi 6 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
19581958 // Make the module, which holds all the code.
19591959 llvm::Module *module = new llvm::Module("my cool jit", context);
19601960
1961 llvm::JITMemoryManager *MemMgr = new llvm::SectionMemoryManager();
1961 llvm::RTDyldMemoryManager *MemMgr = new llvm::SectionMemoryManager();
19621962
19631963 // Build engine with JIT
19641964 llvm::EngineBuilder factory(module);
19651965 factory.setEngineKind(llvm::EngineKind::JIT);
19661966 factory.setAllocateGVsWithCode(false);
19671967 factory.setTargetOptions(Opts);
1968 factory.setJITMemoryManager(MemMgr);
1968 factory.setMCJITMemoryManager(MemMgr);
19691969 factory.setUseMCJIT(true);
19701970 llvm::ExecutionEngine *executionEngine = factory.create();
19711971