Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit fc595f1

Browse files
committed
[WIP] Use FnAbi everywhere instead of our own abi calculations
1 parent 4555737 commit fc595f1

File tree

9 files changed

+355
-317
lines changed

9 files changed

+355
-317
lines changed

src/abi/comments.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use std::borrow::Cow;
55

66
use rustc_middle::mir;
7-
use rustc_target::abi::call::ArgAbi;
7+
use rustc_target::abi::call::PassMode;
88

99
use cranelift_codegen::entity::EntityRef;
1010

@@ -23,7 +23,8 @@ pub(super) fn add_arg_comment<'tcx>(
2323
local: Option<mir::Local>,
2424
local_field: Option<usize>,
2525
params: EmptySinglePair<Value>,
26-
arg_abi: &ArgAbi<'tcx, Ty<'tcx>>,
26+
arg_abi_mode: PassMode,
27+
arg_layout: TyAndLayout<'tcx>,
2728
) {
2829
let local = if let Some(local) = local {
2930
Cow::Owned(format!("{:?}", local))
@@ -42,15 +43,15 @@ pub(super) fn add_arg_comment<'tcx>(
4243
Pair(param_a, param_b) => Cow::Owned(format!("= {:?}, {:?}", param_a, param_b)),
4344
};
4445

45-
let pass_mode = format!("{:?}", arg_abi.mode);
46+
let pass_mode = format!("{:?}", arg_abi_mode);
4647
fx.add_global_comment(format!(
4748
"{kind:5}{local:>3}{local_field:<5} {params:10} {pass_mode:36} {ty:?}",
4849
kind = kind,
4950
local = local,
5051
local_field = local_field,
5152
params = params,
5253
pass_mode = pass_mode,
53-
ty = arg_abi.layout.ty,
54+
ty = arg_layout.ty,
5455
));
5556
}
5657

0 commit comments

Comments
 (0)