mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
TypeLoc-related cleanup: add FIXMEs to the places in validateType that need to
compute sub-TypeLocs, and fix the places that don't need them not to reuse the parent TypeLoc. Swift SVN r2374
This commit is contained in:
@@ -60,11 +60,15 @@ void BuiltinModuleCache::lookupValue(Identifier Name, NLKind LookupKind,
|
||||
|
||||
ValueDecl *&Entry = Cache[Name];
|
||||
|
||||
if (Entry == 0)
|
||||
if (Type Ty = getBuiltinType(M.Ctx, Name.str()))
|
||||
Entry = new (M.Ctx) TypeAliasDecl(SourceLoc(), Name, SourceLoc(),
|
||||
if (Entry == 0) {
|
||||
if (Type Ty = getBuiltinType(M.Ctx, Name.str())) {
|
||||
auto TAD = new (M.Ctx) TypeAliasDecl(SourceLoc(), Name, SourceLoc(),
|
||||
Ty, nullptr, M.Ctx.TheBuiltinModule,
|
||||
MutableArrayRef<Type>());
|
||||
TAD->setType(MetaTypeType::get(TAD->getAliasType(), M.Ctx));
|
||||
Entry = TAD;
|
||||
}
|
||||
}
|
||||
|
||||
if (Entry == 0)
|
||||
Entry = getBuiltinValue(M.Ctx, Name);
|
||||
|
||||
Reference in New Issue
Block a user