mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ownership] Create a context structure for the linear lifetime checker.
This is just a simple refactoring commit in preparation for hiding more of the details of the linear lifetime checker. This is NFC, just moving around code.
This commit is contained in:
@@ -780,9 +780,8 @@ AvailableValueAggregator::addMissingDestroysForCopiedValues(
|
||||
// Then perform the linear lifetime check. If we succeed, continue. We have
|
||||
// no further work to do.
|
||||
auto errorKind = ownership::ErrorBehaviorKind::ReturnFalse;
|
||||
auto error =
|
||||
valueHasLinearLifetime(cvi, {svi}, {}, visitedBlocks, deadEndBlocks,
|
||||
errorKind, &leakingBlocks);
|
||||
LinearLifetimeChecker checker(visitedBlocks, deadEndBlocks);
|
||||
auto error = checker.checkValue(cvi, {svi}, {}, errorKind, &leakingBlocks);
|
||||
if (!error.getFoundError())
|
||||
continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user