mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Remove ASTMutationListener::addedExternalType(). It's useless now.
Swift SVN r8491
This commit is contained in:
@@ -183,9 +183,6 @@ public:
|
|||||||
/// This state should be tracked somewhere else.
|
/// This state should be tracked somewhere else.
|
||||||
unsigned LastCheckedExternalDefinition = 0;
|
unsigned LastCheckedExternalDefinition = 0;
|
||||||
|
|
||||||
/// \brief The list of externally-created types that need validation.
|
|
||||||
std::vector<Type> ExternalTypes;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// \brief The current generation number, which reflects the number of
|
/// \brief The current generation number, which reflects the number of
|
||||||
/// times that external modules have been loaded.
|
/// times that external modules have been loaded.
|
||||||
@@ -336,10 +333,6 @@ public:
|
|||||||
/// was just added.
|
/// was just added.
|
||||||
void addedExternalDecl(Decl *decl);
|
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.
|
/// Add a cleanup function to be called when the ASTContext is deallocated.
|
||||||
void addCleanup(std::function<void(void)> cleanup);
|
void addCleanup(std::function<void(void)> cleanup);
|
||||||
|
|
||||||
|
|||||||
@@ -27,9 +27,6 @@ namespace swift {
|
|||||||
|
|
||||||
/// \brief A new declaration was added to the AST.
|
/// \brief A new declaration was added to the AST.
|
||||||
virtual void addedExternalDecl(Decl *decl) = 0;
|
virtual void addedExternalDecl(Decl *decl) = 0;
|
||||||
|
|
||||||
/// \brief A new type was added to the AST.
|
|
||||||
virtual void addedExternalType(Type type) = 0;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -541,11 +541,6 @@ void ASTContext::addedExternalDecl(Decl *decl) {
|
|||||||
listener->addedExternalDecl(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) {
|
void ASTContext::addCleanup(std::function<void(void)> cleanup) {
|
||||||
Impl.Cleanups.push_back(std::move(cleanup));
|
Impl.Cleanups.push_back(std::move(cleanup));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -560,10 +560,7 @@ Type ClangImporter::Implementation::importType(clang::QualType type,
|
|||||||
}
|
}
|
||||||
|
|
||||||
SwiftTypeConverter converter(*this, kind);
|
SwiftTypeConverter converter(*this, kind);
|
||||||
Type converted = converter.Visit(type.getTypePtr());
|
return converter.Visit(type.getTypePtr());
|
||||||
if (converted)
|
|
||||||
SwiftContext.addedExternalType(converted);
|
|
||||||
return converted;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Given the first selector piece for an init method, e.g., \c initWithFoo,
|
/// Given the first selector piece for an init method, e.g., \c initWithFoo,
|
||||||
|
|||||||
@@ -332,11 +332,6 @@ namespace {
|
|||||||
virtual void addedExternalDecl(Decl *decl) {
|
virtual void addedExternalDecl(Decl *decl) {
|
||||||
TU->getASTContext().ExternalDefinitions.insert(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);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,10 +62,6 @@ void TypeChecker::addedExternalDecl(Decl *decl) {
|
|||||||
Context.ExternalDefinitions.insert(decl);
|
Context.ExternalDefinitions.insert(decl);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TypeChecker::addedExternalType(Type type) {
|
|
||||||
Context.ExternalTypes.push_back(type);
|
|
||||||
}
|
|
||||||
|
|
||||||
ProtocolDecl *TypeChecker::getProtocol(SourceLoc loc, KnownProtocolKind kind) {
|
ProtocolDecl *TypeChecker::getProtocol(SourceLoc loc, KnownProtocolKind kind) {
|
||||||
auto protocol = Context.getProtocol(kind);
|
auto protocol = Context.getProtocol(kind);
|
||||||
if (!protocol && loc.isValid()) {
|
if (!protocol && loc.isValid()) {
|
||||||
|
|||||||
@@ -705,10 +705,6 @@ public:
|
|||||||
|
|
||||||
/// \brief A new declaration was added to the AST.
|
/// \brief A new declaration was added to the AST.
|
||||||
virtual void addedExternalDecl(Decl *decl);
|
virtual void addedExternalDecl(Decl *decl);
|
||||||
|
|
||||||
/// \brief A new type was added to the AST.
|
|
||||||
virtual void addedExternalType(Type type);
|
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
/// \name Lazy resolution.
|
/// \name Lazy resolution.
|
||||||
|
|||||||
Reference in New Issue
Block a user