diff options
author | Lang Hames <lhames@gmail.com> | 2020-01-21 22:43:08 -0800 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2020-01-21 22:45:21 -0800 |
commit | 97d000da2e6025600c4709d611e853eb1d5d407c (patch) | |
tree | 7925d85315408602cbfa7804da490ba3cc681a79 /llvm/examples/LLJITExamples/LLJITWithObjectCache/LLJITWithObjectCache.cpp | |
parent | 1d1ebb9e592bea931845296dd80a46fb46af2642 (diff) | |
download | llvm-97d000da2e6025600c4709d611e853eb1d5d407c.zip llvm-97d000da2e6025600c4709d611e853eb1d5d407c.tar.gz llvm-97d000da2e6025600c4709d611e853eb1d5d407c.tar.bz2 |
[ORC] Fix the LLJITWithObjectCache example to address changes in ce2207abaf9.
Diffstat (limited to 'llvm/examples/LLJITExamples/LLJITWithObjectCache/LLJITWithObjectCache.cpp')
-rw-r--r-- | llvm/examples/LLJITExamples/LLJITWithObjectCache/LLJITWithObjectCache.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/examples/LLJITExamples/LLJITWithObjectCache/LLJITWithObjectCache.cpp b/llvm/examples/LLJITExamples/LLJITWithObjectCache/LLJITWithObjectCache.cpp index 377babb..c7e4051 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<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()); |