debuginfo: Fix DW_AT_containing_type vtable debuginfo regression#93503
Merged
bors merged 3 commits intorust-lang:masterfrom Feb 10, 2022
Merged
Conversation
Collaborator
|
☔ The latest upstream changes (presumably #93154) made this pull request unmergeable. Please resolve the merge conflicts. |
…o::metadata more generally applicable.
…accidentally been removed in rust-lang#89597. Also describe vtables as structs with a field for each entry.
1b29d98 to
fc7f419
Compare
Member
Author
|
This is ready for review now. |
wesleywiser
approved these changes
Feb 7, 2022
| (format!("__method{}", index), void_pointer_type_debuginfo) | ||
| } | ||
| ty::VtblEntry::TraitVPtr(_) => { | ||
| (format!("__super_trait_ptr{}", index), void_pointer_type_debuginfo) |
Member
There was a problem hiding this comment.
This points to the super trait's vtable? It would be good (eventually) if we could set the type correctly here. I'm not sure if we might need to walk the tree of vtables for some reason ...
Member
Author
There was a problem hiding this comment.
Yes, there is definitely room for improvement here. Types of the fn pointers as well. I'll add a comment about the super trait pointer.
Member
|
@bors r+ |
Collaborator
|
📌 Commit ed21805 has been approved by |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Feb 9, 2022
…debuginfo-regression, r=wesleywiser debuginfo: Fix DW_AT_containing_type vtable debuginfo regression This PR brings back the `DW_AT_containing_type` attribute for vtables after it has accidentally been removed in rust-lang#89597. It also implements a more accurate description of vtables. Instead of describing them as an array of void pointers, the compiler will now emit a struct type description with a field for each entry of the vtable. r? `@wesleywiser` This PR should fix issue rust-lang#93164. ~~The PR is blocked on rust-lang#93154 because both of them modify the `codegen/debug-vtable.rs` test case.~~
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 10, 2022
…askrgr Rollup of 6 pull requests Successful merges: - rust-lang#91443 (Better suggestions when user tries to collect into an unsized `[_]`) - rust-lang#91504 (`#[used(linker)]` attribute) - rust-lang#93503 (debuginfo: Fix DW_AT_containing_type vtable debuginfo regression) - rust-lang#93753 (Complete removal of #[main] attribute from compiler) - rust-lang#93799 (Fix typo in `std::fmt` docs) - rust-lang#93813 (Make a few cleanup MIR passes public) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 25, 2022
…pemap, r=wesleywiser debuginfo: Simplify TypeMap used during LLVM debuginfo generation. This PR simplifies the TypeMap that is used in `rustc_codegen_llvm::debuginfo::metadata`. It was unnecessarily complicated because it was originally implemented when types were not yet normalized before codegen. So it did it's own normalization and kept track of multiple unnormalized types being mapped to a single unique id. This PR is based on rust-lang#93503, which is not merged yet. The PR also removes the arena used for allocating string ids and instead uses `InlinableString` from the [inlinable_string](https://crates.io/crates/inlinable_string) crate. That might not be the best choice, since that crate does not seem to be very actively maintained. The [flexible-string](https://crates.io/crates/flexible-string) crate would be an alternative. r? `@ghost`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR brings back the
DW_AT_containing_typeattribute for vtables after it has accidentally been removed in #89597.It also implements a more accurate description of vtables. Instead of describing them as an array of void pointers, the compiler will now emit a struct type description with a field for each entry of the vtable.
r? @wesleywiser
This PR should fix issue #93164.
The PR is blocked on #93154 because both of them modify thecodegen/debug-vtable.rstest case.