convert to pointer_cast where we can

This commit is contained in:
Folkert 2022-12-17 23:21:19 +01:00
parent 8e36456765
commit 3720c38e2b
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
9 changed files with 213 additions and 1064 deletions

View file

@ -263,11 +263,11 @@ pub fn build_longjmp_call(env: &Env) {
call_void_bitcode_fn(env, &[jmp_buf.into(), tag.into()], bitcode::UTILS_LONGJMP);
} else {
// Call the LLVM-intrinsic longjmp: `void @llvm.eh.sjlj.longjmp(i8* %setjmp_buf)`
let jmp_buf_i8p = env.builder.build_bitcast(
let jmp_buf_i8p = env.builder.build_pointer_cast(
jmp_buf,
env.context.i8_type().ptr_type(AddressSpace::Generic),
"jmp_buf i8*",
);
let _call = env.build_intrinsic_call(LLVM_LONGJMP, &[jmp_buf_i8p]);
let _call = env.build_intrinsic_call(LLVM_LONGJMP, &[jmp_buf_i8p.into()]);
}
}