Commits

Jordan Rose committed a41c1fe7cb3
[stdlib] Don't try to swap an element with itself in 'partition'. (or in 'randomShuffle') This violates our inout aliasing rules, and can cause a crash in certain situations. To try to prevent this in the future I've added a debugPrecondition check to 'swap' that checks addresses. This will only catch inout violations where neither argument uses writeback, and might some day be optimized away. Right now, though, it does seem to catch some simple violations (though not the one in the Radar), so hopefully it will at least help keep us from introducing new problems. rdar://problem/21780567 Swift SVN r30956