1
0
forked from M-Labs/nac3

nac3core: fix llvm.expect intrinsic name

this might be one of the causes for the random segfault bug
This commit is contained in:
ychenfo 2022-05-27 04:23:12 +08:00
parent b04631e935
commit 76473152e8

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