HomePhabricator

[CaptureTracking] Early abort on too many uses (NFCI)

Authored by nikic on Sat, Nov 7, 2:47 AM.

Description

[CaptureTracking] Early abort on too many uses (NFCI)

If there are too many uses, we should directly return -- there's
no point in inspecting the remaining uses in the worklist, as we
have to conservatively assume a capture anyway. This also means
that tooManyUses() gets called exactly once, rather than
potentially many times.

This restores the behavior prior to e9832dfdf366ddffba68164adb6855d17c9f87c1,
where this was accidentally changed while moving the AddUses logic
into a closure, thus making the return a return from the closure
rather than the whole function.

Details

Committed
nikicSat, Nov 7, 2:52 AM
Parents
rGd1fbf39b64a7: [CaptureTrackingTest] Add missing override marker (NFC)
Branches
Unknown
Tags
Unknown