about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-07-07 18:06:53 +0530
committerGitHub <noreply@github.com>2022-07-07 18:06:53 +0530
commit5474f56bcf08584211ce7207568204ae7ac481db (patch)
tree6e01ee3c23963921f73dbc1c79f7d0b1946a9451 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent4f9933afbd2f238b16fdfe7a7a07cb52554edfea (diff)
parentcac25cde182ced8146e9f2b33e99bda31d2c70f9 (diff)
downloadrust-5474f56bcf08584211ce7207568204ae7ac481db.tar.gz
rust-5474f56bcf08584211ce7207568204ae7ac481db.zip
Rollup merge of #98930 - tmiasko:pub-basic-blocks, r=oli-obk
Make MIR basic blocks field public

This makes it possible to mutably borrow different fields of the MIR
body without resorting to methods like `basic_blocks_local_decls_mut_and_var_debug_info`.

To preserve validity of control flow graph caches in the presence of
modifications, a new struct `BasicBlocks` wraps together basic blocks
and control flow graph caches.

The `BasicBlocks` dereferences to `IndexVec<BasicBlock, BasicBlockData>`.
On the other hand a mutable access requires explicit `as_mut()` call.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions