diff --git a/examples/LLJITExamples/LLJITWithObjectCache/LLJITWithObjectCache.cpp b/examples/LLJITExamples/LLJITWithObjectCache/LLJITWithObjectCache.cpp index 377babb8c3c..c7e4051b4fe 100644 --- a/examples/LLJITExamples/LLJITWithObjectCache/LLJITWithObjectCache.cpp +++ b/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());