diff options
author | Lang Hames <lhames@gmail.com> | 2020-01-21 22:43:08 -0800 |
---|---|---|
committer | Hans Wennborg <hans@chromium.org> | 2020-01-29 21:50:18 +0100 |
commit | 92edb295392dea9c7f545f180065292459ebe4e9 (patch) | |
tree | e5dda2afa30ae434252bc9a2b255fbdd278d4628 | |
parent | 011adfcbbdbe945222ef7bc8b1a9799aac2cbea3 (diff) | |
download | bcm5719-llvm-92edb295392dea9c7f545f180065292459ebe4e9.tar.gz bcm5719-llvm-92edb295392dea9c7f545f180065292459ebe4e9.zip |
[ORC] Fix the LLJITWithObjectCache example to address changes in ce2207abaf9.
(cherry picked from commit 97d000da2e6025600c4709d611e853eb1d5d407c)
-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 377babb8c3c..c7e4051b4fe 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()); |