Fix ExecutionEngine post-update in upstream LLVM

LLVM r367686 changed the locking scheme to avoid potential deadlocks and the
related llvm::orc::ThreadSafeModule APIs ExecutionEngine was relying upon,
breaking the MLIR build.  Update our use of ThreadSafeModule to unbreak the
build.

PiperOrigin-RevId: 261566571
This commit is contained in:
Alex Zinenko 2019-08-04 07:47:36 -07:00 committed by A. Unique TensorFlower
parent 9d7655677f
commit d043f0025b
1 changed files with 3 additions and 1 deletions

View File

@ -183,7 +183,9 @@ private:
(void)resp; (void)resp;
if (!irTransformer) if (!irTransformer)
return std::move(module); return std::move(module);
if (Error err = irTransformer(module.getModule())) Error err = module.withModuleDo(
[this](llvm::Module &module) { return irTransformer(&module); });
if (err)
return std::move(err); return std::move(err);
return std::move(module); return std::move(module);
}; };