AST: Don't call hasType()/getType()/setType() on TypeDecls

This commit is contained in:
Slava Pestov
2016-11-30 01:30:08 -08:00
parent 07780bd60c
commit 9caaad442b
18 changed files with 104 additions and 109 deletions

View File

@@ -84,7 +84,7 @@ void BuiltinUnit::LookupCache::lookupValue(
/*genericparams*/nullptr,
const_cast<BuiltinUnit*>(&M));
TAD->computeType();
TAD->setInterfaceType(TAD->getType());
TAD->setInterfaceType(MetatypeType::get(TAD->getAliasType(), Ctx));
TAD->setAccessibility(Accessibility::Public);
Entry = TAD;
}
@@ -346,7 +346,6 @@ ModuleDecl::ModuleDecl(Identifier name, ASTContext &ctx)
Flags({0, 0, 0}), DSOHandle(nullptr) {
ctx.addDestructorCleanup(*this);
setImplicit();
setType(ModuleType::get(this));
setInterfaceType(ModuleType::get(this));
setAccessibility(Accessibility::Public);
}