about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/attributes.rs
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2021-05-02 17:00:23 +0200
committerGitHub <noreply@github.com>2021-05-02 17:00:23 +0200
commit25530538282b932472e7d6740142c970038ec222 (patch)
tree2c4b7d1fcab8f33e0327250ba5927b0337de1fbe /compiler/rustc_codegen_llvm/src/attributes.rs
parent4198d0a87cf9cd97c451414f168f9d2609754201 (diff)
parent5bf989ece9e29941f2c517a39289a60bfb8595c0 (diff)
downloadrust-25530538282b932472e7d6740142c970038ec222.tar.gz
rust-25530538282b932472e7d6740142c970038ec222.zip
Rollup merge of #84752 - lrh2000:generator-debuginfo, r=tmandry
Fix debuginfo for generators

First, all fields except the discriminant (including `outer_fields`) should be put into structures inside the variant part, which gives an equivalent layout but offers us much better integration with debuggers.

Second, artificial flags in generator variants should be removed.
 - Literally, variants are not artificial. We have `yield` statements, upvars and inner variables in the source code.
 - Functionally, we don't want debuggers to suppress the variants. It contains the state of the generator, which is useful when debugging. So they shouldn't be marked artificial.
 - Debuggers may use artificial flags to find the active variant. In this case, marking variants artificial will make debuggers not work properly.

Fixes #62572.
Fixes #79009.

And refer https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Debuginfo.20for.20generators.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/attributes.rs')
0 files changed, 0 insertions, 0 deletions