Skip to content

Include ABI information in rustc_layout(debug) #115168

Closed
@RalfJung

Description

@RalfJung

It is currently rather hard to figure out which PassMode a type will get. It would be great to have some way to display that information, similar to rustc_layout(debug). The logic for computing PassMode is currently here and we'd have to find some way to invoke it:

let mut arg = ArgAbi::new(cx, layout, |layout, scalar, offset| {
let mut attrs = ArgAttributes::new();
adjust_for_rust_scalar(
*cx,
&mut attrs,
scalar,
*layout,
offset,
is_return,
drop_target_pointee,
);
attrs
});

@eddyb @bjorn3 any advice on how to implement this? Or is it meaningless to ask about the PassMode of a type, since this has to always be considered in the context of a particular function signature?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions