]> git.lizzy.rs Git - rust.git/blob - src/librustc_target/abi/call/wasm32.rs
Auto merge of #57770 - Zoxc:no-hash-query, r=michaelwoerister
[rust.git] / src / librustc_target / abi / call / wasm32.rs
1 use crate::abi::call::{FnType, ArgType};
2
3 fn classify_ret_ty<Ty>(ret: &mut ArgType<'_, Ty>) {
4     ret.extend_integer_width_to(32);
5 }
6
7 fn classify_arg_ty<Ty>(arg: &mut ArgType<'_, Ty>) {
8     arg.extend_integer_width_to(32);
9 }
10
11 pub fn compute_abi_info<Ty>(fty: &mut FnType<'_, Ty>) {
12     if !fty.ret.is_ignore() {
13         classify_ret_ty(&mut fty.ret);
14     }
15
16     for arg in &mut fty.args {
17         if arg.is_ignore() { continue; }
18         classify_arg_ty(arg);
19     }
20 }