diff options
author | Chris Lattner <sabre@nondot.org> | 2009-03-28 04:13:34 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-03-28 04:13:34 +0000 |
commit | 3599dbe94ed8229b4a0eca0b066129e381ccb277 (patch) | |
tree | 0265da6c7610ff9e466325d74550213cffca5cba /lib/Sema/ParseAST.cpp | |
parent | dacbc5d46aaeea817742b8c76c987b87d2490c85 (diff) |
remove TranslationUnit from ParseAST.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67911 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/ParseAST.cpp')
-rw-r--r-- | lib/Sema/ParseAST.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/Sema/ParseAST.cpp b/lib/Sema/ParseAST.cpp index 756a398b4c..bcff1c8cfb 100644 --- a/lib/Sema/ParseAST.cpp +++ b/lib/Sema/ParseAST.cpp @@ -25,24 +25,25 @@ using namespace clang; //===----------------------------------------------------------------------===// /// ParseAST - Parse the entire file specified, notifying the ASTConsumer as -/// the file is parsed. This inserts the parsed decls into TU. +/// the file is parsed. This inserts the parsed decls into the translation unit +/// held by Ctx. /// void clang::ParseAST(Preprocessor &PP, ASTConsumer *Consumer, - TranslationUnit &TU, bool PrintStats) { + ASTContext &Ctx, bool PrintStats) { // Collect global stats on Decls/Stmts (until we have a module streamer). if (PrintStats) { Decl::CollectingStats(true); Stmt::CollectingStats(true); } - Sema S(PP, TU.getContext(), *Consumer); + Sema S(PP, Ctx, *Consumer); Parser P(PP, S); PP.EnterMainSourceFile(); // Initialize the parser. P.Initialize(); - Consumer->Initialize(TU.getContext()); + Consumer->Initialize(Ctx); Parser::DeclTy *ADecl; @@ -56,12 +57,12 @@ void clang::ParseAST(Preprocessor &PP, ASTConsumer *Consumer, } }; - Consumer->HandleTranslationUnit(TU.getContext()); + Consumer->HandleTranslationUnit(Ctx); if (PrintStats) { fprintf(stderr, "\nSTATISTICS:\n"); P.getActions().PrintStats(); - TU.getContext().PrintStats(); + Ctx.PrintStats(); Decl::PrintStats(); Stmt::PrintStats(); Consumer->PrintStats(); |