Skip to content

Commit 4cc1914

Browse files
committed
---
yaml --- r: 349482 b: refs/heads/master-next c: 80c48bf h: refs/heads/master
1 parent 3500434 commit 4cc1914

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 3574c513bbc5578dd9346b4ea9ab5995c5927bb5
3-
refs/heads/master-next: 7c60b58c976a76855a5b9fccc534b80a833cdf0a
3+
refs/heads/master-next: 80c48bfe24507c98083c0e49433325ae8250ca19
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
66
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-b: 66d897bfcf64a82cb9a87f5e663d889189d06d07

branches/master-next/lib/SILOptimizer/Mandatory/SemanticARCOpts.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,13 @@ static bool isConsumed(
100100
return true;
101101
}
102102
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");
107110
continue;
108111
}
109112
}

0 commit comments

Comments
 (0)