[llvm] 97d000d - [ORC] Fix the LLJITWithObjectCache example to address changes in ce2207abaf9.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 21 22:45:41 PST 2020
Author: Lang Hames
Date: 2020-01-21T22:45:21-08:00
New Revision: 97d000da2e6025600c4709d611e853eb1d5d407c
URL: https://github.com/llvm/llvm-project/commit/97d000da2e6025600c4709d611e853eb1d5d407c
DIFF: https://github.com/llvm/llvm-project/commit/97d000da2e6025600c4709d611e853eb1d5d407c.diff
LOG: [ORC] Fix the LLJITWithObjectCache example to address changes in ce2207abaf9.
Added:
Modified:
llvm/examples/LLJITExamples/LLJITWithObjectCache/LLJITWithObjectCache.cpp
Removed:
################################################################################
diff --git a/llvm/examples/LLJITExamples/LLJITWithObjectCache/LLJITWithObjectCache.cpp b/llvm/examples/LLJITExamples/LLJITWithObjectCache/LLJITWithObjectCache.cpp
index 377babb8c3c3..c7e4051b4fee 100644
--- a/llvm/examples/LLJITExamples/LLJITWithObjectCache/LLJITWithObjectCache.cpp
+++ b/llvm/examples/LLJITExamples/LLJITWithObjectCache/LLJITWithObjectCache.cpp
@@ -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());
More information about the llvm-commits
mailing list