-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
debuginfo: Emit ZST struct debuginfo for unit type when CPP-like debuginfo is enabled #96316
debuginfo: Emit ZST struct debuginfo for unit type when CPP-like debuginfo is enabled #96316
Conversation
…ginfo is enabled (instead of custom basic type).
1a3cf27
to
8b23008
Compare
@bors r+ |
📌 Commit 8b23008 has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (09064a2): comparison url. Summary:
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
The regressed benchmark is serde-derive-opt full which has been experiencing some fluctuations since at least 4/22. This PR doesn't touch any code relevant to that benchmark (changes target debuginfo on Windows and the test is release on Linux) so I'm confident this is not actually a regression. |
Agreed, I see no way how this PR could affect performance in a meaningful way, especially on Linux. |
As already discovered in 24a728a, PDB does not play well with custom basic types. This PR extends to the fix to
()
: Instead of a custom basic type, we treat it like an empty tuple (i.e. it is described as a struct which happens to have no fields).Before this change anything with a
()
in it would cause trouble, which is especially bad for*const ()
and*mut ()
which are often used for opaque pointers. E.g. the test case added in this PR would look like:With the PR it produces the expected output:
r? @wesleywiser