Skip to content

vfe: annotate non-prefix vtables - #166715

Draft
folkertdev wants to merge 3 commits into
rust-lang:mainfrom
folkertdev:vfe-annotate-non-prefix-vtables
Draft

folkertdev wants to merge 3 commits into
rust-lang:mainfrom
folkertdev:vfe-annotate-non-prefix-vtables

Conversation

@folkertdev

Copy link
Copy Markdown
Contributor

tracking issue: #68262

builds on #166164

A vtable in a constant takes a different codegen path, and previously it did not apply the attributes that virtual function elimination needs. That could lead to miscompilations

- GCC does not need to set the VFE metadata. I'd like it to also use get_vtable, but that requires more refactoring, and I'd prefer to do that in the `rustc_codegen_gcc` repo
- Cranelift already shares the vtable creation code across places where it emits one.
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 28, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants