Yesterday, I simplified how we stream top-level decls.
After a discussion with Ted, we both came to the conclusion that adding a "HandleTopLevelDeclaration" hook to ASConsumer is far more elegant. The default implementation of HandleTopLevelDeclaration will be responsible for iterating over the ScopedDecl (which has a chain of the decls:-).
TODO: Once Ted adds HandleTopLevelDeclaration, make sure TagDecls are chainged appropriately...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44445 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Sema/Sema.cpp b/Sema/Sema.cpp
index d3930f6..6b799e0 100644
--- a/Sema/Sema.cpp
+++ b/Sema/Sema.cpp
@@ -63,8 +63,8 @@
return Context.getObjcProtoType();
}
-Sema::Sema(Preprocessor &pp, ASTContext &ctxt, std::vector<Decl*> &prevInGroup)
- : PP(pp), Context(ctxt), CurFunctionDecl(0), TopLevelDeclList(prevInGroup) {
+Sema::Sema(Preprocessor &pp, ASTContext &ctxt)
+ : PP(pp), Context(ctxt), CurFunctionDecl(0) {
// Get IdentifierInfo objects for known functions for which we
// do extra checking.