From 76473152e88867a2c9cc1afa58de7f17c72054ba Mon Sep 17 00:00:00 2001 From: ychenfo Date: Fri, 27 May 2022 04:23:12 +0800 Subject: [PATCH] nac3core: fix llvm.expect intrinsic name this might be one of the causes for the random segfault bug --- nac3core/src/codegen/expr.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nac3core/src/codegen/expr.rs b/nac3core/src/codegen/expr.rs index 964c88b3..ff4a1292 100644 --- a/nac3core/src/codegen/expr.rs +++ b/nac3core/src/codegen/expr.rs @@ -460,7 +460,7 @@ impl<'ctx, 'a> CodeGenContext<'ctx, 'a> { let i1_true = i1.const_all_ones(); let expect_fun = self.module.get_function("llvm.expect.i1").unwrap_or_else(|| { self.module.add_function( - "llvm.expect", + "llvm.expect.i1", i1.fn_type(&[i1.into(), i1.into()], false), None, )