about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-10-10 14:07:47 +0200
committerGitHub <noreply@github.com>2023-10-10 14:07:47 +0200
commitf4de82c2b32df3ec9fb8bbed669ad386283bc7bd (patch)
tree4154c8f2a05f49a03aa86db76d45560b100d7c84 /compiler/rustc_codegen_llvm/src
parent0bc5696dd96708e0cc0447779d7cbdd46cadc2a7 (diff)
parent5d629457fd3bb580b87800f7c2858ddfe3f1c0ac (diff)
downloadrust-f4de82c2b32df3ec9fb8bbed669ad386283bc7bd.tar.gz
rust-f4de82c2b32df3ec9fb8bbed669ad386283bc7bd.zip
Rollup merge of #116589 - Zalathar:successors, r=oli-obk
coverage: Unbox and simplify `bcb_filtered_successors`

This is a small cleanup in the coverage instrumentor's graph-building code.

---
This function already has access to the MIR body, so instead of taking a reference to a terminator, it's simpler and easier to pass in a basic block index.

There is no need to box the returned iterator if we instead add appropriate lifetime captures, and make `short_circuit_preorder` generic over the type of iterator it expects.

We can also greatly simplify the function's implementation by observing that the only difference between its two cases is whether we take all of a BB's successors, or just the first one.

---

`@rustbot` label +A-code-coverage
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions