Get rid of isModuleScope bit, since we don't like scattering bits across the AST; as a replacement, introduce TopLevelCodeDecl, which provides a DeclContext for all expressions and statements at the top level. <rdar://problem/11259941>.

Swift SVN r1503
This commit is contained in:
Eli Friedman
2012-04-19 21:22:12 +00:00
parent 4c15635046
commit d5e7784010
23 changed files with 191 additions and 170 deletions

View File

@@ -61,8 +61,7 @@ TypeAliasDecl *BuiltinModuleCache::lookupType(Identifier Name,
if (Entry == 0)
if (Type Ty = getBuiltinType(M.Ctx, Name.str()))
Entry = new (M.Ctx) TypeAliasDecl(SourceLoc(), Name, Ty,
M.Ctx.TheBuiltinModule,
/*IsModuleScope*/true);
M.Ctx.TheBuiltinModule);
return dyn_cast_or_null<TypeAliasDecl>(Entry);
}