Commits

Michael Gottesman committed 8b28640b030
Tail Allocate the array of protocol conformance pointers on init_existential_metatype. Previously all uses of this instruction used the single element ArrayRef constructor. The single element ArrayRef constructor does not require any extra memory. In the case where one does need extra memory, one would need to allocate the memory for the init_existential_metatype and pass it in. This commit changes init_existential_metatype to tail allocate the memory for the conformance pointers and memcpy them in from the array. Discovered when a SmallVector of protocol conformances resulted in memory corruption and frustration =--(. rdar://22302277 Swift SVN r31276