Get rid of the implicit BraceStmt for the TranslationUnit; instead, have the TranslationUnit directly store a list of decls.

Swift SVN r1521
This commit is contained in:
Eli Friedman
2012-04-20 00:17:13 +00:00
parent 596f494f51
commit be602fcd05
12 changed files with 49 additions and 89 deletions

View File

@@ -67,7 +67,7 @@ swift::buildSingleTranslationUnit(ASTContext &Context, unsigned BufferID,
if (!ParseOnly) {
performNameBinding(TU, CurTUElem);
performTypeChecking(TU, CurTUElem);
CurTUElem = TU->Body->getNumElements();
CurTUElem = TU->Decls.size();
}
} while (BufferOffset != Buffer->getBufferSize());
@@ -88,7 +88,7 @@ bool swift::appendToMainTranslationUnit(TranslationUnit *TU, unsigned BufferID,
performNameBinding(TU, CurTUElem);
performTypeChecking(TU, CurTUElem);
}
CurTUElem = TU->Body->getNumElements();
CurTUElem = TU->Decls.size();
} while (BufferOffset != BufferEndOffset);
return FoundAnySideEffects;
}