Skip to content

Commit

Permalink
[ORC] Fix the LLJITWithObjectCache example to address changes in ce2207a
Browse files Browse the repository at this point in the history
.

(cherry picked from commit 97d000d)
  • Loading branch information
lhames authored and zmodem committed Jan 29, 2020
1 parent 011adfc commit 92edb29
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -50,17 +50,17 @@ class MyObjectCache : public ObjectCache {

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());

Expand Down

0 comments on commit 92edb29

Please sign in to comment.