Commit Graph

2 Commits

Author SHA1 Message Date
Stephen Canon
fb8b9e143d SIMD into stdlib
Implements SE-0229.

Also updates simd module types in the Apple SDKs to use the new types, and updates a couple tests to work with the new types and protocols.
2018-11-29 17:09:01 -05:00
Arnold Schwaighofer
599cca2f1b ASTContext: Add trivially representable types even if we loaded their library later
Add CGFloat (and other types that this applies to) as a trivial type even after
the one-time initialization of the ForeignRepresentableCache.

This allows

  let str = ""
  import Foundation
  let pt = CGPoint(x: 1.0, y: 2.0)

to work.

Before we would populate the cache the first time on the first line "let str =
..." and because the CoreGraphics module was not loaded we would not add CGFloat
as a trivial type. When we come to query for CGFloat on the third line we would
return NSNumber instead of CGFloat as a type and that would crash IRGen.

rdar://31610342
2017-04-20 09:35:06 -07:00