nac3core: fix llvm.expect intrinsic name

this might be one of the causes for the random segfault bug
issue-136
ychenfo 2022-05-27 04:23:12 +08:00
parent b04631e935
commit 76473152e8
1 changed files with 1 additions and 1 deletions

View File

@ -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,
)