mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-02 09:47:57 +00:00
Fix COFF renaming of decorated (stdcall/fastcall/vectorcall) exports rust-lang/rust#163188 handled Arm64EC's `#` mangling in `symbol_edit`, but COFF decoration support there was still incomplete: matching against exported symbols only stripped the i686 `_` prefix, so `stdcall`/`fastcall`/`vectorcall` exports were wrongly treated as internal and renamed. `link.rs` already had the full undecoration, so this shares it as `symbol_export::undecorate_coff_symbol`, uses it from both places, and covers the decorated calling conventions in the run-make test. LLM disclosure: Initially, I mistakenly over-scoped the extraction of the shared undecorate logic; the LLM helped me narrow the scope and ultimately pinpoint a single function, and I am currently using the streamlined version it suggested. Additionally, the LLM assisted me in designing the specific test functions within `decorated_lib.rs`. r? @bjorn3
Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.