[cfe-commits] r110956 - in /cfe/trunk/lib/Sema: ParseAST.cpp Sema.cpp
John McCall
rjmccall at apple.com
Thu Aug 12 14:23:27 PDT 2010
Author: rjmccall
Date: Thu Aug 12 16:23:27 2010
New Revision: 110956
URL: http://llvm.org/viewvc/llvm-project?rev=110956&view=rev
Log:
dgregor should write code that compiles.
Modified:
cfe/trunk/lib/Sema/ParseAST.cpp
cfe/trunk/lib/Sema/Sema.cpp
Modified: cfe/trunk/lib/Sema/ParseAST.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/ParseAST.cpp?rev=110956&r1=110955&r2=110956&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/ParseAST.cpp (original)
+++ cfe/trunk/lib/Sema/ParseAST.cpp Thu Aug 12 16:23:27 2010
@@ -67,6 +67,8 @@
Stmt::CollectingStats(true);
}
+ ASTConsumer *Consumer = &S.getASTConsumer();
+
Parser P(S.getPreprocessor(), S);
S.getPreprocessor().EnterMainSourceFile();
@@ -93,15 +95,15 @@
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();
Modified: cfe/trunk/lib/Sema/Sema.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/Sema.cpp?rev=110956&r1=110955&r2=110956&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/Sema.cpp (original)
+++ cfe/trunk/lib/Sema/Sema.cpp Thu Aug 12 16:23:27 2010
@@ -18,7 +18,7 @@
#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"
@@ -145,7 +145,7 @@
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))
@@ -154,7 +154,7 @@
// 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() {
More information about the cfe-commits
mailing list