Adopt SourceFile in name-binding.

Swift SVN r9105
This commit is contained in:
Jordan Rose
2013-10-09 22:44:32 +00:00
parent fe37b82a0b
commit 0d2ccf7cb3
8 changed files with 69 additions and 70 deletions

View File

@@ -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
//===----------------------------------------------------------------------===//