Skip to main content

windows_calling_convention_name

Function windows_calling_convention_name 

Source
pub fn windows_calling_convention_name<'tcx>(
    target: &Target,
    conv: CanonAbi,
    name: &str,
    args: &[ArgAbi<'tcx, Ty<'tcx>>],
) -> Option<String>
Expand description

Computes the linker-visible decorated symbol name for supported Windows calling conventions using the original FnAbi argument layouts. Vectorcall is also decorated on non-Windows targets.

The byte count is computed before backend-specific argument lowering, which may replace indirectly passed arguments with pointers.

For example, on 32-bit Windows, extern "fastcall" fn foo(i32, i32) is decorated as @foo@8. On 64-bit targets, extern "vectorcall" fn foo(i32) is decorated as foo@@8.

Returns None if no decoration is required or if the name begins with \x01 or ?, indicating that it must not be decorated further.

This function does not add LLVM’s \x01 escape prefix. Backend-specific handling of that marker is the responsibility of the caller.