diff options
| author | lrh2000 <lrh2000@pku.edu.cn> | 2021-05-15 19:01:13 +0800 |
|---|---|---|
| committer | lrh2000 <lrh2000@pku.edu.cn> | 2021-07-09 23:09:48 +0800 |
| commit | cda90f55419ce449f3a9db327465d9b2ae7dfce9 (patch) | |
| tree | 16325f4b16e3865b249ebcc2182eaea1a2ca54b1 /src/test/debuginfo/generator-objects.rs | |
| parent | 29856acffeb87541bb167c33f4fdb13c31ba6de0 (diff) | |
| download | rust-cda90f55419ce449f3a9db327465d9b2ae7dfce9.tar.gz rust-cda90f55419ce449f3a9db327465d9b2ae7dfce9.zip | |
Store names of captured variables in `optimized_mir`
- Closures in external crates may get compiled in because of monomorphization. We should store names of captured variables in `optimized_mir`, so that they are written into the metadata file and we can use them to generate debuginfo. - If there are breakpoints inside closures, the names of captured variables stored in `optimized_mir` can be used to print them. Now the name is more precise when disjoint fields are captured.
Diffstat (limited to 'src/test/debuginfo/generator-objects.rs')
| -rw-r--r-- | src/test/debuginfo/generator-objects.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/debuginfo/generator-objects.rs b/src/test/debuginfo/generator-objects.rs index 46a3d7924a1..9bf33a7bb87 100644 --- a/src/test/debuginfo/generator-objects.rs +++ b/src/test/debuginfo/generator-objects.rs @@ -11,16 +11,16 @@ // gdb-command:run // gdb-command:print b -// gdb-check:$1 = generator_objects::main::{generator#0}::Unresumed{_captured_ref__a: 0x[...]} +// gdb-check:$1 = generator_objects::main::{generator#0}::Unresumed{_ref__a: 0x[...]} // gdb-command:continue // gdb-command:print b -// gdb-check:$2 = generator_objects::main::{generator#0}::Suspend0{c: 6, d: 7, _captured_ref__a: 0x[...]} +// gdb-check:$2 = generator_objects::main::{generator#0}::Suspend0{c: 6, d: 7, _ref__a: 0x[...]} // gdb-command:continue // gdb-command:print b -// gdb-check:$3 = generator_objects::main::{generator#0}::Suspend1{c: 7, d: 8, _captured_ref__a: 0x[...]} +// gdb-check:$3 = generator_objects::main::{generator#0}::Suspend1{c: 7, d: 8, _ref__a: 0x[...]} // gdb-command:continue // gdb-command:print b -// gdb-check:$4 = generator_objects::main::{generator#0}::Returned{_captured_ref__a: 0x[...]} +// gdb-check:$4 = generator_objects::main::{generator#0}::Returned{_ref__a: 0x[...]} // === LLDB TESTS ================================================================================== |
