about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorZalathar <Zalathar@users.noreply.github.com>2024-05-01 17:33:33 +1000
committerZalathar <Zalathar@users.noreply.github.com>2024-05-30 15:38:46 +1000
commit35a8746832a4d9103f317c5cac56cfa1e0316d8c (patch)
tree42409627b5bbc32a3ba1f675d7b147759d0bd6ee /compiler/rustc_codegen_llvm/src
parent20174e6638eb0d5ac0195706ce6cc7185949a407 (diff)
downloadrust-35a8746832a4d9103f317c5cac56cfa1e0316d8c.tar.gz
rust-35a8746832a4d9103f317c5cac56cfa1e0316d8c.zip
coverage: Instrument the RHS value of lazy logical operators
When a lazy logical operator (`&&` or `||`) occurs outside of an `if`
condition, it normally doesn't have any associated control-flow branch, so we
don't have an existing way to track whether it was true or false.

This patch adds special code to handle this case, by inserting extra MIR blocks
in a diamond shape after evaluating the RHS. This gives us a place to insert
the appropriate marker statements, which can then be given their own counters.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions