diff options
| author | Aaron Hill <aa1ronham@gmail.com> | 2021-12-22 14:35:17 -0500 |
|---|---|---|
| committer | Aaron Hill <aa1ronham@gmail.com> | 2021-12-22 14:36:34 -0500 |
| commit | cac431ba750c4f079690731b976bc67d979cb8e3 (patch) | |
| tree | 3f58e4c7c63c2d0c55ed31e7736927005aece152 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | e100ec5bc7cd768ec17d75448b29c9ab4a39272b (diff) | |
| download | rust-cac431ba750c4f079690731b976bc67d979cb8e3.tar.gz rust-cac431ba750c4f079690731b976bc67d979cb8e3.zip | |
Store a `DefId` instead of an `AdtDef` in `AggregateKind::Adt`
The `AggregateKind` enum ends up in the final mir `Body`. Currently, any changes to `AdtDef` (regardless of how significant they are) will legitimately cause the overall result of `optimized_mir` to change, invalidating any codegen re-use involving that mir. This will get worse once we start hashing the `Span` inside `FieldDef` (which is itself contained in `AdtDef`). To try to reduce these kinds of invalidations, this commit changes `AggregateKind::Adt` to store just the `DefId`, instead of the full `AdtDef`. This allows the result of `optimized_mir` to be unchanged if the `AdtDef` changes in a way that doesn't actually affect any of the MIR we build.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
