[serialization] Check cyclic dependencies for typealiases better.

Deserializing a typealias's underlying type can lead to us trying to
deserialize the alias again. When we get back to the outer request,
check to see if there was an inner request, in which case we don't need
to do anything else.

<rdar://problem/14757837>

Swift SVN r7280
This commit is contained in:
Jordan Rose
2013-08-16 17:50:23 +00:00
parent c700bc9a49
commit d8c3302552

View File

@@ -736,12 +736,11 @@ Decl *ModuleFile::getDecl(DeclID DID, Optional<DeclContext *> ForcedContext,
superclassTypeID);
auto DC = ForcedContext ? *ForcedContext : getDeclContext(contextID);
auto underlyingType = TypeLoc::withoutLoc(getType(underlyingTypeID));
if (declOrOffset.isComplete())
break;
auto underlyingType = TypeLoc::withoutLoc(getType(underlyingTypeID));
auto alias = new (ctx) TypeAliasDecl(SourceLoc(), getIdentifier(nameID),
SourceLoc(), underlyingType,
DC, { });