<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_codegen_llvm/src/debuginfo, branch 1.63.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.63.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.63.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2022-06-16T15:53:59+00:00</updated>
<entry>
<title>Move/rename `lazy::{OnceCell, Lazy}` to `cell::{OnceCell, LazyCell}`</title>
<updated>2022-06-16T15:53:59+00:00</updated>
<author>
<name>Maybe Waffle</name>
<email>waffle.lapkin@gmail.com</email>
</author>
<published>2022-06-16T15:41:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7c360dc117d554a11f7193505da0835c4b890c6f'/>
<id>urn:sha1:7c360dc117d554a11f7193505da0835c4b890c6f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add metadata generation for vtables when using VFE</title>
<updated>2022-06-14T12:50:52+00:00</updated>
<author>
<name>flip1995</name>
<email>philipp.krones@embecosm.com</email>
</author>
<published>2022-04-21T13:02:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e96e6e2c89265613e136369ccf314c408e1eb002'/>
<id>urn:sha1:e96e6e2c89265613e136369ccf314c408e1eb002</id>
<content type='text'>
This adds the typeid and `vcall_visibility` metadata to vtables when the
-Cvirtual-function-elimination flag is set.

The typeid is generated in the same way as for the
`llvm.type.checked.load` intrinsic from the trait_ref.

The offset that is added to the typeid is always 0. This is because LLVM
assumes that vtables are constructed according to the definition in the
Itanium ABI. This includes an "address point" of the vtable. In C++ this
is the offset in the vtable where information for RTTI is placed. Since
there is no RTTI information in Rust's vtables, this "address point" is
always 0. This "address point" in combination with the offset passed to
the `llvm.type.checked.load` intrinsic determines the final function
that should be loaded from the vtable in the
`WholeProgramDevirtualization` pass in LLVM. That's why the
`llvm.type.checked.load` intrinsics are generated with the typeid of the
trait, rather than with that of the function that is called. This
matches what `clang` does for C++.

The vcall_visibility metadata depends on three factors:

1. LTO level: Currently this is always fat LTO, because LLVM only
   supports this optimization with fat LTO.
2. Visibility of the trait: If the trait is publicly visible, VFE
   can only act on its vtables after linking.
3. Number of CGUs: if there is more than one CGU, also vtables with
   restricted visibility could be seen outside of the CGU, so VFE can
   only act on them after linking.

To reflect this, there are three visibility levels: Public, LinkageUnit,
and TranslationUnit.
</content>
</entry>
<entry>
<title>Specify DWARF alignment in bits, not bytes.</title>
<updated>2022-06-07T20:38:35+00:00</updated>
<author>
<name>Patrick Walton</name>
<email>pcwalton@fb.com</email>
</author>
<published>2022-06-07T20:38:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fe533e862cd2d2d65e14970d327365dfe593aa27'/>
<id>urn:sha1:fe533e862cd2d2d65e14970d327365dfe593aa27</id>
<content type='text'>
In DWARF, alignment of types is specified in bits, as is made clear by the
parameter name `AlignInBits`. However, `rustc` was incorrectly passing a byte
alignment. This commit fixes that.

This was noticed in upstream LLVM when I tried to check in a test consisting of
LLVM IR generated from `rustc` and it triggered assertions [1].

[1]: https://reviews.llvm.org/D126835
</content>
</entry>
<entry>
<title>Auto merge of #97287 - compiler-errors:type-interner, r=jackh726,oli-obk</title>
<updated>2022-05-29T08:20:13+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2022-05-29T08:20:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0f06824013761ed6829887019033f1001e68f623'/>
<id>urn:sha1:0f06824013761ed6829887019033f1001e68f623</id>
<content type='text'>
Move things to `rustc_type_ir`

Finishes some work proposed in https://github.com/rust-lang/compiler-team/issues/341.

r? `@ghost`
</content>
</entry>
<entry>
<title>Fix TyKind lint, make consts no longer fn, etc</title>
<updated>2022-05-28T18:38:22+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2022-05-27T03:22:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=34e05812e029206add91fa39df86765fcb3f8b5a'/>
<id>urn:sha1:34e05812e029206add91fa39df86765fcb3f8b5a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Initial fixes on top of type interner commit</title>
<updated>2022-05-28T18:38:22+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2022-05-22T19:57:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a056a953f00d7b78d12dc192b34c47cca6fa7b6b'/>
<id>urn:sha1:a056a953f00d7b78d12dc192b34c47cca6fa7b6b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Update documentation.</title>
<updated>2022-05-24T18:22:14+00:00</updated>
<author>
<name>ridwanabdillahi</name>
<email>91507758+ridwanabdillahi@users.noreply.github.com</email>
</author>
<published>2022-05-24T18:22:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ab1f8ed2d912cfdefb5d6d734456732d5bb064e7'/>
<id>urn:sha1:ab1f8ed2d912cfdefb5d6d734456732d5bb064e7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add support for embedding pretty printers via the `#[debugger_visualizer]` attribute. Add tests for embedding pretty printers and update documentation.</title>
<updated>2022-05-24T18:14:48+00:00</updated>
<author>
<name>ridwanabdillahi</name>
<email>91507758+ridwanabdillahi@users.noreply.github.com</email>
</author>
<published>2022-05-24T18:14:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=60458b97e750452409aa7e7e2307be6205512167'/>
<id>urn:sha1:60458b97e750452409aa7e7e2307be6205512167</id>
<content type='text'>
Ensure all error checking for `#[debugger_visualizer]` is done up front and not when the `debugger_visualizer` query is run.

Clean up potential ODR violations when embedding pretty printers into the `__rustc_debug_gdb_scripts_section__` section.

Respond to PR comments and update documentation.
</content>
</entry>
<entry>
<title>Properly apply path prefix remapping paths emitted into debuginfo.</title>
<updated>2022-05-18T10:19:01+00:00</updated>
<author>
<name>Michael Woerister</name>
<email>michaelwoerister@posteo</email>
</author>
<published>2022-05-05T15:26:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6411fef3aba5ba54a02b54b171b4e9bc83687ce9'/>
<id>urn:sha1:6411fef3aba5ba54a02b54b171b4e9bc83687ce9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Auto merge of #96094 - Elliot-Roberts:fix_doctests, r=compiler-errors</title>
<updated>2022-05-07T06:30:29+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2022-05-07T06:30:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=574830f5730f2cfc3abdb486428d33d541c0abee'/>
<id>urn:sha1:574830f5730f2cfc3abdb486428d33d541c0abee</id>
<content type='text'>
Begin fixing all the broken doctests in `compiler/`

Begins to fix #95994.
All of them pass now but 24 of them I've marked with `ignore HELP (&lt;explanation&gt;)` (asking for help) as I'm unsure how to get them to work / if we should leave them as they are.
There are also a few that I marked `ignore` that could maybe be made to work but seem less important.
Each `ignore` has a rough "reason" for ignoring after it parentheses, with

- `(pseudo-rust)` meaning "mostly rust-like but contains foreign syntax"
- `(illustrative)` a somewhat catchall for either a fragment of rust that doesn't stand on its own (like a lone type), or abbreviated rust with ellipses and undeclared types that would get too cluttered if made compile-worthy.
- `(not-rust)` stuff that isn't rust but benefits from the syntax highlighting, like MIR.
- `(internal)` uses `rustc_*` code which would be difficult to make work with the testing setup.

Those reason notes are a bit inconsistently applied and messy though. If that's important I can go through them again and try a more principled approach. When I run `rg '```ignore \(' .` on the repo, there look to be lots of different conventions other people have used for this sort of thing. I could try unifying them all if that would be helpful.

I'm not sure if there was a better existing way to do this but I wrote my own script to help me run all the doctests and wade through the output. If that would be useful to anyone else, I put it here: https://github.com/Elliot-Roberts/rust_doctest_fixing_tool
</content>
</entry>
</feed>
