Skip to content

Commit 6aa0e0f

Browse files
committed
Revert "Fix infinite loop in Projection."
This reverts commit a630f59. Seems to cause a compiler crash on Linux.
1 parent ec83f8c commit 6aa0e0f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

include/swift/SIL/Projection.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ class ProjectionPath {
394394
/// We only allow for moves of ProjectionPath since we only want them to be
395395
/// able to be constructed by calling our factory method or by going through
396396
/// the append function.
397-
ProjectionPath(ProjectionPath &&Other) : Path(std::move(Other.Path)) {}
397+
ProjectionPath(ProjectionPath &&Other) : Path(Other.Path) {}
398398

399399
/// Append the projection P onto this.
400400
ProjectionPath &append(const Projection &P) {
@@ -411,7 +411,8 @@ class ProjectionPath {
411411
}
412412

413413
ProjectionPath &operator=(ProjectionPath &&O) {
414-
std::swap(Path, O.Path);
414+
*this = std::move(O);
415+
O.Path.clear();
415416
return *this;
416417
}
417418

0 commit comments

Comments
 (0)