Commits

Michael Gottesman committed 0a15d018cc8
Rely on the stdlib's runtime assert and undefined behavior to promote 3/4 remaining unchecked_addr_cast types to object bit casts. This commit enables support in the optimizer for promoting the following unchecked_addr_cast kinds to object bit casts: 1. (Trivial => Trivial) yields a trivial bit cast. 2. (Non-Trivial => Trivial) yields a trivial bit cast. 3. (Non-Trivial => Non-Trivial) yields a ref bit cast. We do not promote conversions in between trivial and non-trivial types since a trivial bit cast must have a trivial output and if we allowed for ref bit casts in between the two, we would be breaking the rule that ref bit casts do not change the reference semantics of its input, output types. Technically, we could lower trivial => trivial as a ref cast and then simplify later but that is unnecessary currently. <rdar://problem/17373087> Swift SVN r19784