<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_codegen_llvm/src/debuginfo, branch 1.60.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.60.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.60.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2022-02-16T12:29:00+00:00</updated>
<entry>
<title>debuginfo: Support fat pointers to unsized tuples.</title>
<updated>2022-02-16T12:29:00+00:00</updated>
<author>
<name>Michael Woerister</name>
<email>michaelwoerister@posteo</email>
</author>
<published>2022-02-16T10:18:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=28ca6b0f79ebe238d1deb0c06b0b17396716b958'/>
<id>urn:sha1:28ca6b0f79ebe238d1deb0c06b0b17396716b958</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Overhaul `TyS` and `Ty`.</title>
<updated>2022-02-15T05:03:24+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2022-01-25T03:13:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e9a0c429c5da5a34c0469117774fe32694a0281c'/>
<id>urn:sha1:e9a0c429c5da5a34c0469117774fe32694a0281c</id>
<content type='text'>
Specifically, change `Ty` from this:
```
pub type Ty&lt;'tcx&gt; = &amp;'tcx TyS&lt;'tcx&gt;;
```
to this
```
pub struct Ty&lt;'tcx&gt;(Interned&lt;'tcx, TyS&lt;'tcx&gt;&gt;);
```
There are two benefits to this.
- It's now a first class type, so we can define methods on it. This
  means we can move a lot of methods away from `TyS`, leaving `TyS` as a
  barely-used type, which is appropriate given that it's not meant to
  be used directly.
- The uniqueness requirement is now explicit, via the `Interned` type.
  E.g. the pointer-based `Eq` and `Hash` comes from `Interned`, rather
  than via `TyS`, which wasn't obvious at all.

Much of this commit is boring churn. The interesting changes are in
these files:
- compiler/rustc_middle/src/arena.rs
- compiler/rustc_middle/src/mir/visit.rs
- compiler/rustc_middle/src/ty/context.rs
- compiler/rustc_middle/src/ty/mod.rs

Specifically:
- Most mentions of `TyS` are removed. It's very much a dumb struct now;
  `Ty` has all the smarts.
- `TyS` now has `crate` visibility instead of `pub`.
- `TyS::make_for_test` is removed in favour of the static `BOOL_TY`,
  which just works better with the new structure.
- The `Eq`/`Ord`/`Hash` impls are removed from `TyS`. `Interned`s impls
  of `Eq`/`Hash` now suffice. `Ord` is now partly on `Interned`
  (pointer-based, for the `Equal` case) and partly on `TyS`
  (contents-based, for the other cases).
- There are many tedious sigil adjustments, i.e. adding or removing `*`
  or `&amp;`. They seem to be unavoidable.
</content>
</entry>
<entry>
<title>debuginfo: Bring back DW_AT_containing_type for vtables -- address review comments</title>
<updated>2022-02-08T14:31:09+00:00</updated>
<author>
<name>Michael Woerister</name>
<email>michaelwoerister@posteo</email>
</author>
<published>2022-02-08T14:31:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ed21805aee9ad1abed5dc5157ac568e95fd84afb'/>
<id>urn:sha1:ed21805aee9ad1abed5dc5157ac568e95fd84afb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>debuginfo: Bring back DW_AT_containing_type for vtables after it has accidentally been</title>
<updated>2022-02-03T09:03:16+00:00</updated>
<author>
<name>Michael Woerister</name>
<email>michaelwoerister@posteo</email>
</author>
<published>2022-01-25T13:34:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fc7f419a63e4c98a928729d0ad59c426ccb84963'/>
<id>urn:sha1:fc7f419a63e4c98a928729d0ad59c426ccb84963</id>
<content type='text'>
removed in https://github.com/rust-lang/rust/pull/89597.

Also describe vtables as structs with a field for each entry.
</content>
</entry>
<entry>
<title>debuginfo: Make some helper functions in rustc_codegen_llvm::debuginfo::metadata more generally applicable.</title>
<updated>2022-02-03T09:03:16+00:00</updated>
<author>
<name>Michael Woerister</name>
<email>michaelwoerister@posteo</email>
</author>
<published>2022-01-25T13:26:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f4799b8709439a53502ac45c8bc694047de26c38'/>
<id>urn:sha1:f4799b8709439a53502ac45c8bc694047de26c38</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Auto merge of #93154 - michaelwoerister:fix-generic-closure-and-generator-debuginfo, r=wesleywiser</title>
<updated>2022-02-02T12:37:28+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2022-02-02T12:37:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=dca1e7aa5a8ac05ddaea731f4eab20de91acb46b'/>
<id>urn:sha1:dca1e7aa5a8ac05ddaea731f4eab20de91acb46b</id>
<content type='text'>
debuginfo: Make sure that type names for closure and generator environments are unique in debuginfo.

Before this change, closure/generator environments coming from different instantiations of the same generic function were all assigned the same name even though they were distinct types with potentially different data layout. Now we append the generic arguments of the originating function to the type name.

This commit also emits `{closure_env#0}` as the name of these types in order to disambiguate them from the accompanying closure function (which keeps being called `{closure#0}`). Previously both were assigned the same name.

NOTE: Changing debuginfo names like this can break pretty printers and other debugger plugins. I think it's OK in this particular case because the names we are changing were ambiguous anyway. In general though it would be great to have a process for doing changes like these.
</content>
</entry>
<entry>
<title>debuginfo: Make sure that type names for closure and generator environments are unique in debuginfo.</title>
<updated>2022-02-01T09:39:40+00:00</updated>
<author>
<name>Michael Woerister</name>
<email>michaelwoerister@posteo</email>
</author>
<published>2022-01-19T16:56:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fd7557b7ee454058fff84b556892adbef89f7d52'/>
<id>urn:sha1:fd7557b7ee454058fff84b556892adbef89f7d52</id>
<content type='text'>
Before this change, closure/generator environments coming from different
instantiations of the same generic function were all assigned the same
name even though they were distinct types with potentially different data
layout. Now we append the generic arguments of the originating function
to the type name.

This commit also emits '{closure_env#0}' as the name of these types in
order to disambiguate them from the accompanying closure function
'{closure#0}'. Previously both were assigned the same name.
</content>
</entry>
<entry>
<title>Auto merge of #93006 - michaelwoerister:fix-unsized-ptr-debuginfo, r=davidtwco,oli-obk</title>
<updated>2022-01-28T12:46:13+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2022-01-28T12:46:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=427eba2f0bacdeaebc992a78eb2889564de7d7cf'/>
<id>urn:sha1:427eba2f0bacdeaebc992a78eb2889564de7d7cf</id>
<content type='text'>
Fix debuginfo for pointers/references to unsized types

This PR makes the compiler emit fat pointer debuginfo in all cases. Before, we sometimes got thin-pointer debuginfo, making it impossible to fully interpret the pointed to memory in debuggers. The code is actually cleaner now, especially around generation of trait object pointer debuginfo.

Fixes https://github.com/rust-lang/rust/issues/92718

~~Blocked on https://github.com/rust-lang/rust/pull/92729.~~
</content>
</entry>
<entry>
<title>[debuginfo] Fix and unify handling of fat pointers in debuginfo: Don't mark fat pointer fields as artificial.</title>
<updated>2022-01-28T09:41:36+00:00</updated>
<author>
<name>Michael Woerister</name>
<email>michaelwoerister@posteo</email>
</author>
<published>2022-01-28T09:41:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c10f9e7d1d6deba9797642fdd24a01ba9bb25d47'/>
<id>urn:sha1:c10f9e7d1d6deba9797642fdd24a01ba9bb25d47</id>
<content type='text'>
LLDB does not seem to see fields if they are marked with DW_AT_artificial
which breaks pretty printers that use these fields for decoding fat pointers.
</content>
</entry>
<entry>
<title>[debuginfo] Fix and unify handling of fat pointers in debuginfo: Change doc comment so it is not interpreted as doc-test.</title>
<updated>2022-01-27T15:55:48+00:00</updated>
<author>
<name>Michael Woerister</name>
<email>michaelwoerister@posteo</email>
</author>
<published>2022-01-27T15:55:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d33e317a72548ad9fb1439fcd1cfa53d17aefd84'/>
<id>urn:sha1:d33e317a72548ad9fb1439fcd1cfa53d17aefd84</id>
<content type='text'>
</content>
</entry>
</feed>
