mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
In the reverse interop header we generated move constructors that call abort at runtime. This is problematic for several reasons: * In C++14 and below some of our own generated functions like _make ended up calling the move constructor. Those are calling abort and also trigger unreachable code warning in newer versions of Clang. In C++17 and up it is fine due to the guaranteed copy elision. * Type traits are fooled and think these types are movable. As a result, libraries could generate calls to the aborting move ctor. This PR removes the generation of move operations. As we generate copy operations, the compiler will not declare or define the move operations implicitly. Whenever the user goes out of their way and try to move an object they will get a copy instead. rdar://150793518