Files
rust/compiler
bors 619d19c318 Auto merge of #83941 - wesleywiser:win_dbginfo_closures, r=nagisa
Improve debuginfo for closures and async functions on Windows MSVC

The issue was that the resulting debuginfo was too complex for LLVM to
translate into CodeView records correctly. As a result, it simply
ignored the debuginfo which meant Windows debuggers could not display
any closed over variables when stepping inside a closure or async fn.

This fixes that by creating additional allocas on the stack so that
the resulting debuginfo is simple (just `*my_variable.dbg.spill`) and
LLVM can generate the correct CV records.

I also updated some of our existing tests to run in CDB to cover this case.

Before (closure):

![image](https://user-images.githubusercontent.com/831192/113756857-e6dc4200-96df-11eb-8d6d-b7ed7a84aad5.png)

After (closure):

![image](https://user-images.githubusercontent.com/831192/113757067-2e62ce00-96e0-11eb-89f7-7dc8ab89b1b8.png)

Before (async):

![image](https://user-images.githubusercontent.com/831192/114077916-4e2bfa80-9876-11eb-9f15-e302d1faa652.png)

After (async):

![image](https://user-images.githubusercontent.com/831192/114077677-0d33e600-9876-11eb-8ce3-cac20a9ea94a.png)

Fixes #83709
2021-04-08 23:09:06 +00:00
..
2021-04-04 14:10:26 -07:00
2021-03-26 09:32:31 -07:00
2021-03-27 22:16:33 -04:00
2021-04-04 14:57:05 -04:00
2021-03-27 22:16:33 -04:00
2021-03-26 09:32:31 -07:00
2021-04-08 08:03:18 -07:00
2021-03-23 17:16:20 +00:00
2021-04-08 08:03:18 -07:00
2021-03-31 10:15:27 -04:00