diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-09-05 03:59:37 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-05 03:59:37 +0200 |
| commit | 9718f7a09fc9c5b97f8b2c873faf87ba86c11fc6 (patch) | |
| tree | 143556b1e9f6ff0f837ff9407e860ea2fdc2c095 /src/rustllvm/RustWrapper.cpp | |
| parent | d1d511df8c56af39bc491afcd7e896ed4202fdd4 (diff) | |
| parent | 96ac02b8b3aeebc463d434c57b4a2ada9a3003e6 (diff) | |
| download | rust-9718f7a09fc9c5b97f8b2c873faf87ba86c11fc6.tar.gz rust-9718f7a09fc9c5b97f8b2c873faf87ba86c11fc6.zip | |
Rollup merge of #64005 - ecstatic-morse:is-indirect, r=oli-obk
Add a `Place::is_indirect` method to determine whether a `Place` contains a `Deref` projection Working on #63860 requires tracking some property about each local. This requires differentiating `Place`s like `x` and `x.field[index]` from ones like `*x` and `*x.field`, since the first two will always access the same region of memory as `x` while the latter two may access any region of memory. This functionality is duplicated in various places across the compiler. This PR adds a helper method to `Place` which determines whether that `Place` has a `Deref` projection at any point and changes some existing code to use the new method. I've not converted `qualify_consts.rs` to use the new method, since it's not a trivial conversion and it will get replaced anyway by #63860. There may be other potential uses besides the two I change in this PR. r? @oli-obk
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
