[ORC] Fix the LLJITWithObjectCache example to address changes in ce2207abaf9.
authorLang Hames <lhames@gmail.com>
Wed, 22 Jan 2020 06:43:08 +0000 (22:43 -0800)
committerLang Hames <lhames@gmail.com>
Wed, 22 Jan 2020 06:45:21 +0000 (22:45 -0800)
llvm/examples/LLJITExamples/LLJITWithObjectCache/LLJITWithObjectCache.cpp

index 377babb..c7e4051 100644 (file)
@@ -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<IRCompileLayer::CompileFunction> {
+                  -> Expected<std::unique_ptr<IRCompileLayer::IRCompiler>> {
                 auto TM = JTMB.createTargetMachine();
                 if (!TM)
                   return TM.takeError();
-                return IRCompileLayer::CompileFunction(
-                    TMOwningSimpleCompiler(std::move(*TM), &ObjCache));
+                return std::make_unique<TMOwningSimpleCompiler>(std::move(*TM),
+                                                                &ObjCache);
               })
           .create());