fix: use appropriate type for optimizingTransformer func

the call does return an `std::function` and was being referenced using
an `llvm::function_ref`, which apparently with some optim on Mac was
referncing bad memory location
This commit is contained in:
youben11
2022-01-18 11:22:58 +01:00
committed by Ayoub Benaissa
parent 8198a79deb
commit 2926ea6a5e

View File

@@ -245,7 +245,7 @@ lowerLLVMDialectToLLVMIR(mlir::MLIRContext &context,
mlir::LogicalResult optimizeLLVMModule(llvm::LLVMContext &llvmContext,
llvm::Module &module) {
llvm::function_ref<llvm::Error(llvm::Module *)> optPipeline =
std::function<llvm::Error(llvm::Module *)> optPipeline =
mlir::makeOptimizingTransformer(3, 0, nullptr);
if (optPipeline(&module))