From 97d000da2e6025600c4709d611e853eb1d5d407c Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Tue, 21 Jan 2020 22:43:08 -0800 Subject: [PATCH] [ORC] Fix the LLJITWithObjectCache example to address changes in ce2207abaf9. --- .../LLJITWithObjectCache/LLJITWithObjectCache.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/llvm/examples/LLJITExamples/LLJITWithObjectCache/LLJITWithObjectCache.cpp b/llvm/examples/LLJITExamples/LLJITWithObjectCache/LLJITWithObjectCache.cpp index 377babb8c3c3..c7e4051b4fee 100644 --- a/llvm/examples/LLJITExamples/LLJITWithObjectCache/LLJITWithObjectCache.cpp +++ b/llvm/examples/LLJITExamples/LLJITWithObjectCache/LLJITWithObjectCache.cpp @@ -50,17 +50,17 @@ private: void runJITWithCache(ObjectCache &ObjCache) { - // Create an LLJIT instance with a custom CompileFunction. + // Create an LLJIT instance with a custom IRCompiler. auto J = ExitOnErr( LLJITBuilder() .setCompileFunctionCreator( [&](JITTargetMachineBuilder JTMB) - -> Expected { + -> Expected> { auto TM = JTMB.createTargetMachine(); if (!TM) return TM.takeError(); - return IRCompileLayer::CompileFunction( - TMOwningSimpleCompiler(std::move(*TM), &ObjCache)); + return std::make_unique(std::move(*TM), + &ObjCache); }) .create());