diff options
| author | bors <bors@rust-lang.org> | 2016-06-08 13:51:57 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-06-08 13:51:57 -0700 |
| commit | 0d531bfb881e6d303d09de9f212eaac72a9a218d (patch) | |
| tree | 1568111b5de55c3d3b744370dc55d2c4c2afd917 /src/rustllvm/RustWrapper.cpp | |
| parent | 4b240fe96a8b8fcaa412624c398547dbc447a81e (diff) | |
| parent | 0c5930ef256131f8d0e4f020a5029a89944cf250 (diff) | |
| download | rust-0d531bfb881e6d303d09de9f212eaac72a9a218d.tar.gz rust-0d531bfb881e6d303d09de9f212eaac72a9a218d.zip | |
Auto merge of #33989 - eddyb:mir-viz, r=nikomatsakis
[MIR] Make scopes debuginfo-specific (visibility scopes).
Fixes #32949 by having MIR (visibility) scopes mimic the lexical structure.
Unlike #33235, this PR also removes all scopes without variable bindings.
Printing of scopes also changed, e.g. for:
```rust
fn foo(x: i32, y: i32) { let a = 0; let b = 0; let c = 0; }
```
Before my changes:
```rust
fn foo(arg0: i32, arg1: i32) -> () {
let var0: i32; // "x" in scope 1 at <anon>:1:8: 1:9
let var1: i32; // "y" in scope 1 at <anon>:1:16: 1:17
let var2: i32; // "a" in scope 3 at <anon>:1:30: 1:31
let var3: i32; // "b" in scope 6 at <anon>:1:41: 1:42
let var4: i32; // "c" in scope 9 at <anon>:1:52: 1:53
...
scope tree:
0 1 2 3 {
4 5
6 {
7 8
9 10 11
}
}
}
```
After my changes:
```rust
fn foo(arg0: i32, arg1: i32) -> () {
scope 1 {
let var0: i32; // "x" in scope 1 at <anon>:1:8: 1:9
let var1: i32; // "y" in scope 1 at <anon>:1:16: 1:17
scope 2 {
let var2: i32; // "a" in scope 2 at <anon>:1:30: 1:31
scope 3 {
let var3: i32; // "b" in scope 3 at <anon>:1:41: 1:42
scope 4 {
let var4: i32; // "c" in scope 4 at <anon>:1:52: 1:53
}
}
}
}
...
}
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
