summaryrefslogtreecommitdiffstats
path: root/llvm/examples
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2018-09-26 04:00:58 +0000
committerLang Hames <lhames@gmail.com>2018-09-26 04:00:58 +0000
commitea0b7bb548befa8539ce3a9b02584fa001fd89f3 (patch)
treebab8615fc8f957986f49654df598f62d89a7317d /llvm/examples
parent50b33441487f9ccd447e17b1ecbd8799793993d4 (diff)
downloadbcm5719-llvm-ea0b7bb548befa8539ce3a9b02584fa001fd89f3.tar.gz
bcm5719-llvm-ea0b7bb548befa8539ce3a9b02584fa001fd89f3.zip
[ORC] Fix BuildingAJIT tutorial examples that were broken by r343059.
createLocalCompileCallbackManager now returns an Expected value. This commit wraps the call with cantFail to unwrap it. llvm-svn: 343060
Diffstat (limited to 'llvm/examples')
-rw-r--r--llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h4
-rw-r--r--llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h
index 0db97866cef..80c39bd70f7 100644
--- a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h
+++ b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h
@@ -76,8 +76,8 @@ public:
[this](std::unique_ptr<Module> M) {
return optimizeModule(std::move(M));
}),
- CompileCallbackManager(orc::createLocalCompileCallbackManager(
- TM->getTargetTriple(), ES, 0)),
+ CompileCallbackManager(cantFail(orc::createLocalCompileCallbackManager(
+ TM->getTargetTriple(), ES, 0))),
CODLayer(ES, OptimizeLayer,
[&](orc::VModuleKey K) { return Resolvers[K]; },
[&](orc::VModuleKey K, std::shared_ptr<SymbolResolver> R) {
diff --git a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h
index ddd469b9ae2..04ad86e34bf 100644
--- a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h
+++ b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h
@@ -116,8 +116,8 @@ public:
[this](std::unique_ptr<Module> M) {
return optimizeModule(std::move(M));
}),
- CompileCallbackMgr(orc::createLocalCompileCallbackManager(
- TM->getTargetTriple(), ES, 0)) {
+ CompileCallbackMgr(cantFail(orc::createLocalCompileCallbackManager(
+ TM->getTargetTriple(), ES, 0))) {
auto IndirectStubsMgrBuilder =
orc::createLocalIndirectStubsManagerBuilder(TM->getTargetTriple());
IndirectStubsMgr = IndirectStubsMgrBuilder();
OpenPOWER on IntegriCloud