Skip to content

Functions are missing from "--emit=llvm-ir" and "--emit=asm" #119850

Open
@RalfJung

Description

@RalfJung

Ever since #116505 landed, functions can be missing from "--emit=llvm-ir" and "--emit=asm" unless they are declared with #[inline(never)] or #[no_mangle]. This is quite surprising to most people that want to explore the LLVM IR / asm of a Rust function.

It's unclear how to best fix this, since not producing LLVM IR or asm (but only MIR) when compiling these functions was part of the goal of #116505. Maybe these --emit flags should themselves cause the functions to be monomorphized so they become visible again?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generationC-discussionCategory: Discussion or questions that doesn't represent real issues.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions