mirror of
https://github.com/RPCSX/llvm.git
synced 2025-04-03 16:51:42 +00:00
ExceptionDemo: Let setMCJITMemoryManager() take unique_ptr, since r223183.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223188 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ad41590c48
commit
8cc929ea00
@ -1961,13 +1961,13 @@ int main(int argc, char *argv[]) {
|
|||||||
llvm::make_unique<llvm::Module>("my cool jit", context);
|
llvm::make_unique<llvm::Module>("my cool jit", context);
|
||||||
llvm::Module *module = Owner.get();
|
llvm::Module *module = Owner.get();
|
||||||
|
|
||||||
llvm::RTDyldMemoryManager *MemMgr = new llvm::SectionMemoryManager();
|
std::unique_ptr<llvm::RTDyldMemoryManager> MemMgr(new llvm::SectionMemoryManager());
|
||||||
|
|
||||||
// Build engine with JIT
|
// Build engine with JIT
|
||||||
llvm::EngineBuilder factory(std::move(Owner));
|
llvm::EngineBuilder factory(std::move(Owner));
|
||||||
factory.setEngineKind(llvm::EngineKind::JIT);
|
factory.setEngineKind(llvm::EngineKind::JIT);
|
||||||
factory.setTargetOptions(Opts);
|
factory.setTargetOptions(Opts);
|
||||||
factory.setMCJITMemoryManager(MemMgr);
|
factory.setMCJITMemoryManager(std::move(MemMgr));
|
||||||
llvm::ExecutionEngine *executionEngine = factory.create();
|
llvm::ExecutionEngine *executionEngine = factory.create();
|
||||||
|
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user