rust/src/tools
bors 040703018c Auto merge of #94261 - michaelwoerister:debuginfo-types-refactor, r=wesleywiser
debuginfo: Refactor debuginfo generation for types

This PR implements the refactoring of the `rustc_codegen_llvm::debuginfo::metadata` module as described in MCP https://github.com/rust-lang/compiler-team/issues/482.

In particular it
- changes names to use `di_node` instead of `metadata`
- uniformly names all functions that build new debuginfo nodes `build_xyz_di_node`
- renames `CrateDebugContext` to `CodegenUnitDebugContext` (which is more accurate)
- removes outdated parts from `compiler/rustc_codegen_llvm/src/debuginfo/doc.md`
- moves `TypeMap` and functions that work directly work with it to a new `type_map` module
- moves enum related builder functions to a new `enums` module
- splits enum debuginfo building for the native and cpp-like cases, since they are mostly separate
- uses `SmallVec` instead of `Vec` in many places
- removes the old infrastructure for dealing with recursion cycles (`create_and_register_recursive_type_forward_declaration()`, `RecursiveTypeDescription`, `set_members_of_composite_type()`, `MemberDescription`, `MemberDescriptionFactory`, `prepare_xyz_metadata()`, etc)
- adds `type_map::build_type_with_children()` as a replacement for dealing with recursion cycles
- adds many (doc-)comments explaining what's going on
- changes cpp-like naming for C-Style enums so they don't get a `enum$<...>` name (because the NatVis visualizer does not apply to them)
- fixes detection of what is a C-style enum because some enums where classified as C-style even though they have fields
- changes cpp-like naming for generator enums so that NatVis works for them
- changes the position of discriminant debuginfo node so it is consistently nested inside the top-level union instead of, sometimes, next to it

The following could be done in subsequent PRs:
- add caching for `closure_saved_names_of_captured_variables`
- add caching for `generator_layout_and_saved_local_names`
- fix inconsistent handling of what is considered a C-style enum wrt to debuginfo
- rename `metadata` module to `types`
- move common generator fields to front instead of appending them

This PR is based on https://github.com/rust-lang/rust/pull/93644 which is not merged yet.

Right now, the changes are all done in one big commit. They could be split into smaller commits but hopefully the list of changes above makes it tractable to review them as a single commit too.

For now: r? `@ghost` (let's see if this affects compile times)
2022-03-15 10:52:32 +00:00
..
build-manifest Add support for targeting riscv32im-unknown-none-elf 2022-03-09 13:51:29 -08:00
bump-stage0 remove "field is never read" warning 2021-10-23 21:55:57 -04:00
cargo@65c8266426 Update cargo 2022-03-08 20:28:22 -08:00
cargotest Migrate to 2021 2021-09-20 22:21:42 -04:00
clippy Merge commit 'dc5423ad44' into clippyup 2022-03-14 12:02:53 +01:00
compiletest debuginfo: Refactor debuginfo generation for types -- Address review comments. 2022-03-14 17:25:17 +01:00
error_index_generator Rollup merge of #89506 - yaymukund:docblock-headings, r=GuillaumeGomez 2021-10-06 12:33:20 -07:00
expand-yaml-anchors Migrate to 2021 2021-09-20 22:21:42 -04:00
html-checker Support early stopping too old pre-installed tidy command for macOS in the HTML checker 2021-11-07 10:25:04 +09:00
jsondocck jsondocck: Improved error messages for invalid json value and failed @count check 2022-02-09 16:10:58 +00:00
linkchecker Also take in account mdbook redirect in linkchecker 2022-03-09 13:45:50 +01:00
lint-docs Adjust documentation for compatibility with 2021 2021-09-20 22:21:43 -04:00
lld-wrapper rustdoc: several minor fixes 2022-02-19 03:47:41 +08:00
miri@7bc0c98621 update miri 2022-03-14 09:52:47 -04:00
remote-test-client Migrate to 2021 2021-09-20 22:21:42 -04:00
remote-test-server Migrate to 2021 2021-09-20 22:21:42 -04:00
rls@3df74381f3 Update rls 2022-02-10 07:47:01 -08:00
rust-analyzer@5e85158706 ⬆️ rust-analyzer 2022-03-14 19:04:16 +02:00
rust-demangler mangling_v0: Update tests for the rust-demangler tool 2022-01-08 11:39:34 +08:00
rust-installer@5254dbfd25 bump rust-installer submodule 2020-12-28 12:48:11 +01:00
rustbook Update mdbook 2021-12-03 12:25:07 -08:00
rustc-workspace-hack Update winapi shared features. 2021-10-12 07:14:32 -07:00
rustdoc Migrate to 2021 2021-09-20 22:21:42 -04:00
rustdoc-gui Update browser-ui-test version 2022-03-10 17:49:50 +01:00
rustdoc-js Update tester to have FILTER_CRATE set to null if undefined. 2022-02-03 22:59:33 +01:00
rustdoc-themes Migrate to 2021 2021-09-20 22:21:42 -04:00
rustfmt Auto merge of #94584 - pnkfelix:inject-use-suggestion-sites, r=ekuber 2022-03-15 03:56:33 +00:00
tidy Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00
tier-check Migrate to 2021 2021-09-20 22:21:42 -04:00
unicode-table-generator Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00
unstable-book-gen Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00
x Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00
cherry-pick.sh Add cherry-pick.sh convenience script. 2021-08-20 11:58:18 +01:00
publish_toolstate.py Disable validate_maintainers. 2021-09-15 09:25:06 -07:00