Skip to content
Commit 7d866828 authored by Chandler Carruth's avatar Chandler Carruth
Browse files

[leaks] Fix a leak of a basic block when we successfully fold a switch

condition to a constant and emit only the relevant statement. In that
case, we were previously creating the epilog jump destination, a cleanup
scope, and emitting any condition variable into it. Instead, we can emit
the condition variable (if we have one) into the cleanup scope used for
the entire folded case sequence. We avoid creating a jump dest, a basic
block, and an extra cleanup scope. Win!

llvm-svn: 207888
parent 6a56c37b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment