From 2926ea6a5ec8a00d4457cddc5ef090b5e1402d49 Mon Sep 17 00:00:00 2001 From: youben11 Date: Tue, 18 Jan 2022 11:22:58 +0100 Subject: [PATCH] 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 --- compiler/lib/Support/Pipeline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/lib/Support/Pipeline.cpp b/compiler/lib/Support/Pipeline.cpp index e1134f78c..9630bb1e9 100644 --- a/compiler/lib/Support/Pipeline.cpp +++ b/compiler/lib/Support/Pipeline.cpp @@ -245,7 +245,7 @@ lowerLLVMDialectToLLVMIR(mlir::MLIRContext &context, mlir::LogicalResult optimizeLLVMModule(llvm::LLVMContext &llvmContext, llvm::Module &module) { - llvm::function_ref optPipeline = + std::function optPipeline = mlir::makeOptimizingTransformer(3, 0, nullptr); if (optPipeline(&module))