1
Fork 0

Implement intrinsics with fallback bodies

This commit is contained in:
Oli Scherer 2024-01-30 16:03:58 +00:00
parent 0eee945680
commit 92281c7e81
12 changed files with 137 additions and 82 deletions

View file

@ -787,7 +787,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
// Handle intrinsics old codegen wants Expr's for, ourselves.
let intrinsic = match def {
Some(ty::InstanceDef::Intrinsic(def_id)) => Some(bx.tcx().item_name(def_id)),
Some(ty::InstanceDef::Intrinsic(def_id)) => Some(bx.tcx().intrinsic(def_id).unwrap()),
_ => None,
};