Skip to content

Commit 92edb29

Browse files
lhameszmodem
authored andcommitted
[ORC] Fix the LLJITWithObjectCache example to address changes in ce2207a.
(cherry picked from commit 97d000d)
1 parent 011adfc commit 92edb29

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/examples/LLJITExamples/LLJITWithObjectCache/LLJITWithObjectCache.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,17 @@ class MyObjectCache : public ObjectCache {
5050

5151
void runJITWithCache(ObjectCache &ObjCache) {
5252

53-
// Create an LLJIT instance with a custom CompileFunction.
53+
// Create an LLJIT instance with a custom IRCompiler.
5454
auto J = ExitOnErr(
5555
LLJITBuilder()
5656
.setCompileFunctionCreator(
5757
[&](JITTargetMachineBuilder JTMB)
58-
-> Expected<IRCompileLayer::CompileFunction> {
58+
-> Expected<std::unique_ptr<IRCompileLayer::IRCompiler>> {
5959
auto TM = JTMB.createTargetMachine();
6060
if (!TM)
6161
return TM.takeError();
62-
return IRCompileLayer::CompileFunction(
63-
TMOwningSimpleCompiler(std::move(*TM), &ObjCache));
62+
return std::make_unique<TMOwningSimpleCompiler>(std::move(*TM),
63+
&ObjCache);
6464
})
6565
.create());
6666

0 commit comments

Comments
 (0)