File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
branches/master-next/lib/SILOptimizer/Mandatory Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: 3574c513bbc5578dd9346b4ea9ab5995c5927bb5
3
- refs/heads/master-next: 7c60b58c976a76855a5b9fccc534b80a833cdf0a
3
+ refs/heads/master-next: 80c48bfe24507c98083c0e49433325ae8250ca19
4
4
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
5
5
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
6
6
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-b: 66d897bfcf64a82cb9a87f5e663d889189d06d07
Original file line number Diff line number Diff line change @@ -100,10 +100,13 @@ static bool isConsumed(
100
100
return true ;
101
101
}
102
102
case UseLifetimeConstraint::MustBeLive:
103
- // Ok, this constraint can take something owned as live. Lets
104
- // see if it can also take something that is guaranteed. If it
105
- // can not, then we bail.
106
- map.canAcceptKind (ValueOwnershipKind::Guaranteed);
103
+ // Ok, this constraint can take something owned as live. Assert that it
104
+ // can also accept something that is guaranteed. Any non-consuming use of
105
+ // an owned value should be able to take a guaranteed parameter as well
106
+ // (modulo bugs). We assert to catch these.
107
+ assert (map.canAcceptKind (ValueOwnershipKind::Guaranteed) &&
108
+ " Any non-consuming use of an owned value should be able to take a "
109
+ " guaranteed value" );
107
110
continue ;
108
111
}
109
112
}
You can’t perform that action at this time.
0 commit comments