Don't record the declared type of nominal type decls within the module file.

Instead, compute the type just after we load the nominal type
declaration. This centralizes the type-computation code better as
well.


Swift SVN r7454
This commit is contained in:
Doug Gregor
2013-08-22 17:33:24 +00:00
parent 5034803021
commit 2e91172d4f
10 changed files with 44 additions and 116 deletions

View File

@@ -1186,9 +1186,7 @@ ClassDecl *IRGenModule::getSwiftRootClass() {
MutableArrayRef<TypeLoc>(),
/*generics*/ nullptr,
Context.TheBuiltinModule);
auto declaredType = ClassType::get(SwiftRootClass, Type(), Context);
SwiftRootClass->setDeclaredType(declaredType);
SwiftRootClass->setType(MetaTypeType::get(declaredType, Context));
SwiftRootClass->computeType();
SwiftRootClass->getMutableAttrs().ObjC = true;
SwiftRootClass->setIsObjC(true);
return SwiftRootClass;