Commits

John McCall committed 64aa0ea9508
When instantiating a generic class, compensate for unexpected forematter from the superclass. This requires a pretty substantial shift in the generic-metadata allocation/initialization dance because (1) we can't allocate class metadata without knowing what the superclass is and (2) the offset from the metadata cache entry to the address point is no longer determined solely by the metadata pattern. While I'm making invasive changes to metadata, fix two race conditions in metadata creation. The first is that we need to ensure that only one thread succeeds at lazily creating a generic-metadata cache. The second is that we need to ensure that only one thread actually attempts to create a particular metadata; any others should block until the metadata is successfully built. This commit finishes rdar://17776354. LLDB will need to adjust to the runtime-private metadata layout changes. Swift SVN r20537