Stmt::CollectingStats(true);
}
+ ASTConsumer *Consumer = &S.getASTConsumer();
+
Parser P(S.getPreprocessor(), S);
S.getPreprocessor().EnterMainSourceFile();
Consumer->HandleTopLevelDecl(DeclGroupRef(*I));
// Dump record layouts, if requested.
- if (PP.getLangOptions().DumpRecordLayouts)
- DumpRecordLayouts(Ctx);
+ if (S.getLangOptions().DumpRecordLayouts)
+ DumpRecordLayouts(S.getASTContext());
- Consumer->HandleTranslationUnit(Ctx);
+ Consumer->HandleTranslationUnit(S.getASTContext());
if (PrintStats) {
fprintf(stderr, "\nSTATISTICS:\n");
P.getActions().PrintStats();
- Ctx.PrintStats();
+ S.getASTContext().PrintStats();
Decl::PrintStats();
Stmt::PrintStats();
Consumer->PrintStats();
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/APFloat.h"
#include "clang/Sema/ExternalSemaSource.h"
-#include "clang/AST/ASTConsumer.h"
+#include "clang/Sema/SemaConsumer.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTDiagnostic.h"
#include "clang/AST/DeclObjC.h"
ExpressionEvaluationContextRecord(PotentiallyEvaluated, 0));
// Tell the AST consumer about this Sema object.
- Consumer.Initialize(this);
+ Consumer.Initialize(Context);
// FIXME: Isn't this redundant with the initialization above?
if (SemaConsumer *SC = dyn_cast<SemaConsumer>(&Consumer))
// Tell the external Sema source about this Sema object.
if (ExternalSemaSource *ExternalSema
= dyn_cast_or_null<ExternalSemaSource>(Context.getExternalSource()))
- ExternalSema->InitializeSema(S)
+ ExternalSema->InitializeSema(*this);
}
Sema::~Sema() {