IRGen: Instantiate existential metadata through the runtime.

When we need a reference to protocol or protocol composition type metadata, ask for it through the runtime, instead of referencing statically-emitted protocol metadata.

Swift SVN r9871
This commit is contained in:
Joe Groff
2013-11-01 17:13:49 +00:00
parent b1a8e30b16
commit bbddf41693
7 changed files with 88 additions and 9 deletions

View File

@@ -113,6 +113,8 @@ IRGenModule::IRGenModule(ASTContext &Context,
Int32Ty // flags
});
ProtocolDescriptorPtrTy = ProtocolDescriptorStructTy->getPointerTo();
// A tuple type metadata record has a couple extra fields.
auto tupleElementTy = createStructType(*this, "swift.tuple_element_type", {
TypeMetadataPtrTy, // Metadata *Type;