Port getInterfaceType() patterns in libAST

This commit is contained in:
Robert Widmann
2019-09-23 16:49:09 -07:00
parent 8d9629ec43
commit ed18f47d05
6 changed files with 12 additions and 37 deletions

View File

@@ -1817,14 +1817,15 @@ SourceFile::lookupOpaqueResultType(StringRef MangledName,
auto found = ValidatedOpaqueReturnTypes.find(MangledName);
if (found != ValidatedOpaqueReturnTypes.end())
return found->second;
// If there are unvalidated decls with opaque types, go through and validate
// them now.
if (resolver && !UnvalidatedDeclsWithOpaqueReturnTypes.empty()) {
while (!UnvalidatedDeclsWithOpaqueReturnTypes.empty()) {
ValueDecl *decl = *UnvalidatedDeclsWithOpaqueReturnTypes.begin();
UnvalidatedDeclsWithOpaqueReturnTypes.erase(decl);
resolver->resolveDeclSignature(decl);
// FIXME(InterfaceTypeRequest): Remove this.
(void)decl->getInterfaceType();
}
found = ValidatedOpaqueReturnTypes.find(MangledName);