Add comments

Co-authored-by: Ralf Jung <post@ralfj.de>
This commit is contained in:
bjorn3
2026-08-03 15:33:49 +02:00
parent 12ac752844
commit 0417c4e028
2 changed files with 4 additions and 1 deletions

View File

@@ -496,7 +496,9 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
}
ty::FnDef(def_id, args) => {
let instance = self.resolve(def_id, args.no_bound_vars().unwrap())?;
// Don't compute FnAbi for LLVM intrinsics. Trying to that would panic.
// Don't compute FnAbi for LLVM intrinsics. Trying to do that would panic.
// Rust intrinsics however *do* need a FnAbi as we may invoke the
// fallback body like a regular function.
let has_fn_abi = !matches!(instance.def, ty::InstanceKind::LlvmIntrinsic(_));
(
FnVal::Instance(instance),

View File

@@ -223,6 +223,7 @@ fn check_call_site_abi<'tcx>(
DUMMY_SP,
);
if let InstanceKind::LlvmIntrinsic(..) = instance.def {
// LLVM intrinsics don't have an ABI, so there is nothing to check.
return;
}
tcx.fn_abi_of_instance(typing_env.as_query_input((instance, ty::List::empty())))