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
(void)resp;
if (!irTransformer)
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(module);
};