Files
swift-mirror/test/SILGen/coverage_toplevel.swift
Vedant Kumar 7094a64f9a [Coverage] Audit uses of getCurrentCounter() (SR-4453)
We use getCurrentCounter() in one spot where there isn't guaranteed to
be an active region: the `else' part of an IfExpr in a TopLevelCodeDecl.

Fix this issue by assigning a pseudo-counter to the `else' part when the
region stack is empty. This patch also adds crash tests which cover
other code paths which rely on getCurrentCounter() when handling
TopLevelCodeDecls.

Fixes SR-4453.
2017-03-31 16:17:34 -07:00

1.1 KiB