mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Adopt SourceFile in name-binding.
Swift SVN r9105
This commit is contained in:
@@ -1092,13 +1092,18 @@ TranslationUnit::getCachedVisibleDecls() const {
|
||||
|
||||
bool TranslationUnit::walk(ASTWalker &Walker) {
|
||||
llvm::SaveAndRestore<ASTWalker::ParentTy> SAR(Walker.Parent, this);
|
||||
for (Decl *D : MainSourceFile->Decls) {
|
||||
if (D->walk(Walker))
|
||||
return MainSourceFile->walk(Walker);
|
||||
}
|
||||
|
||||
bool SourceFile::walk(ASTWalker &walker) {
|
||||
for (Decl *D : Decls) {
|
||||
if (D->walk(walker))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// LoadedModule Implementation
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
Reference in New Issue
Block a user