Remove ASTMutationListener::addedExternalType(). It's useless now.

Swift SVN r8491
This commit is contained in:
Doug Gregor
2013-09-20 15:15:19 +00:00
parent 6dad378b32
commit 40cf8d1bbc
7 changed files with 1 additions and 32 deletions

View File

@@ -183,9 +183,6 @@ public:
/// This state should be tracked somewhere else.
unsigned LastCheckedExternalDefinition = 0;
/// \brief The list of externally-created types that need validation.
std::vector<Type> ExternalTypes;
private:
/// \brief The current generation number, which reflects the number of
/// times that external modules have been loaded.
@@ -336,10 +333,6 @@ public:
/// was just added.
void addedExternalDecl(Decl *decl);
/// \brief Notify all of the mutation listeners that the given type
/// was just added.
void addedExternalType(Type type);
/// Add a cleanup function to be called when the ASTContext is deallocated.
void addCleanup(std::function<void(void)> cleanup);

View File

@@ -27,9 +27,6 @@ namespace swift {
/// \brief A new declaration was added to the AST.
virtual void addedExternalDecl(Decl *decl) = 0;
/// \brief A new type was added to the AST.
virtual void addedExternalType(Type type) = 0;
};
}

View File

@@ -541,11 +541,6 @@ void ASTContext::addedExternalDecl(Decl *decl) {
listener->addedExternalDecl(decl);
}
void ASTContext::addedExternalType(Type type) {
for (auto listener : Impl.MutationListeners)
listener->addedExternalType(type);
}
void ASTContext::addCleanup(std::function<void(void)> cleanup) {
Impl.Cleanups.push_back(std::move(cleanup));
}

View File

@@ -560,10 +560,7 @@ Type ClangImporter::Implementation::importType(clang::QualType type,
}
SwiftTypeConverter converter(*this, kind);
Type converted = converter.Visit(type.getTypePtr());
if (converted)
SwiftContext.addedExternalType(converted);
return converted;
return converter.Visit(type.getTypePtr());
}
/// Given the first selector piece for an init method, e.g., \c initWithFoo,

View File

@@ -332,11 +332,6 @@ namespace {
virtual void addedExternalDecl(Decl *decl) {
TU->getASTContext().ExternalDefinitions.insert(decl);
}
/// \brief A new type was added to the AST.
virtual void addedExternalType(Type type) {
TU->getASTContext().ExternalTypes.push_back(type);
}
};
}

View File

@@ -62,10 +62,6 @@ void TypeChecker::addedExternalDecl(Decl *decl) {
Context.ExternalDefinitions.insert(decl);
}
void TypeChecker::addedExternalType(Type type) {
Context.ExternalTypes.push_back(type);
}
ProtocolDecl *TypeChecker::getProtocol(SourceLoc loc, KnownProtocolKind kind) {
auto protocol = Context.getProtocol(kind);
if (!protocol && loc.isValid()) {

View File

@@ -705,10 +705,6 @@ public:
/// \brief A new declaration was added to the AST.
virtual void addedExternalDecl(Decl *decl);
/// \brief A new type was added to the AST.
virtual void addedExternalType(Type type);
/// @}
/// \name Lazy resolution.