Files
swift-mirror/test/Profiler/coverage_if.swift
Hamish Knight d1eb6f9465 [Profiler] Avoid introducing empty unreachable regions
When computing the counter for the region
following a labeled statement such as `if`, avoid
adding a new empty region if the counter for such
a region is known to be zero, i.e unreachable.
This avoids adding spurious unreachable regions
after an if statements where each branch returns,
throws, or otherwise jumps to a parent statement.

We will however still add the region if any code
follows such a statement, making it non-empty.

rdar://29390569
2022-08-16 20:27:30 +01:00

3.5 KiB