Skip to content

Commit a3fb65d

Browse files
committed
---
yaml --- r: 344983 b: refs/heads/master c: 1923c27 h: refs/heads/master i: 344981: 2c3ef9e 344979: ed2cce3 344975: e03b865
1 parent 685f455 commit a3fb65d

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,5 +1,5 @@
11
---
2-
refs/heads/master: 579f7e633f52ca28eb2b940f9f1924d80a20fedd
2+
refs/heads/master: 1923c27346f74c21fc19756db61294b9283fbfa5
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/include/swift/SIL/MemAccessUtils.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,9 @@ class ObjectProjection {
5454

5555
const Projection &getProjection() const { return proj; }
5656

57-
const ProjectionPath getProjectionPath() const {
57+
const Optional<ProjectionPath> getProjectionPath() const {
5858
return ProjectionPath::getProjectionPath(stripBorrow(REA->getOperand()),
59-
REA)
60-
.getValue();
59+
REA);
6160
}
6261

6362
bool operator==(const ObjectProjection &other) const {
@@ -284,7 +283,11 @@ class AccessedStorage {
284283
}
285284
auto projPath = getObjectProjection().getProjectionPath();
286285
auto otherProjPath = other.getObjectProjection().getProjectionPath();
287-
return projPath.hasNonEmptySymmetricDifference(otherProjPath);
286+
if (!projPath.hasValue() || !otherProjPath.hasValue()) {
287+
return false;
288+
}
289+
return projPath.getValue().hasNonEmptySymmetricDifference(
290+
otherProjPath.getValue());
288291
}
289292

290293
/// Returns the ValueDecl for the underlying storage, if it can be

0 commit comments

Comments
 (0)