[WIP] Emit nominal type access functions for imported types.

Emit nominal type access functions for imported types. These access
functions work with non-unique metadata references, so they perform
uniquing through the runtime on first access.

Fixes rdar://problem/36430234.
This commit is contained in:
Doug Gregor
2018-01-19 23:11:50 -08:00
parent eb4f9a3d4c
commit 817c0b368e
5 changed files with 136 additions and 37 deletions

View File

@@ -305,6 +305,23 @@ IRGenModule::IRGenModule(IRGenerator &irgen,
NominalTypeDescriptorPtrTy
= NominalTypeDescriptorTy->getPointerTo(DefaultAS);
ClassNominalTypeDescriptorTy =
llvm::StructType::get(LLVMContext, {
Int32Ty,
Int32Ty,
Int32Ty,
Int32Ty,
Int32Ty,
Int32Ty,
Int32Ty,
Int32Ty,
Int32Ty,
Int32Ty,
Int16Ty,
Int16Ty,
Int32Ty,
}, /*packed=*/true);
MethodDescriptorStructTy
= createStructType(*this, "swift.method_descriptor", {
RelativeAddressTy,