1 // Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 use abi::{FnType, ArgType};
12 use context::CodegenCx;
14 fn classify_ret_ty<'a, 'tcx>(_cx: &CodegenCx<'a, 'tcx>, ret: &mut ArgType<'tcx>) {
15 ret.extend_integer_width_to(32);
18 fn classify_arg_ty(arg: &mut ArgType) {
19 arg.extend_integer_width_to(32);
22 pub fn compute_abi_info<'a, 'tcx>(cx: &CodegenCx<'a, 'tcx>, fty: &mut FnType<'tcx>) {
23 if !fty.ret.is_ignore() {
24 classify_ret_ty(cx, &mut fty.ret);
27 for arg in &mut fty.args {
28 if arg.is_ignore() { continue; }