[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
This commit is contained in:
Lang Hames 2018-09-26 04:00:58 +00:00
parent 50b3344148
commit ea0b7bb548
2 changed files with 4 additions and 4 deletions

View File

@ -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) {

View File

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