summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/Parser.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-08-23 02:06:50 +0000
committerChris Lattner <sabre@nondot.org>2008-08-23 02:06:50 +0000
commit9e8c057ab7e53e8ed620df1a95e5c45dfe033b25 (patch)
tree922033437cf532ef40ccdf7b8cb19ab65f0f1caa /clang/lib/Parse/Parser.cpp
parentce90ef51b96f5ec7b3e94cecc05f4eb0f2e4b577 (diff)
downloadbcm5719-llvm-9e8c057ab7e53e8ed620df1a95e5c45dfe033b25.tar.gz
bcm5719-llvm-9e8c057ab7e53e8ed620df1a95e5c45dfe033b25.zip
add action to know about end of translation unit.
llvm-svn: 55218
Diffstat (limited to 'clang/lib/Parse/Parser.cpp')
-rw-r--r--clang/lib/Parse/Parser.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp
index ccdf264bd85..417cc10bfb5 100644
--- a/clang/lib/Parse/Parser.cpp
+++ b/clang/lib/Parse/Parser.cpp
@@ -285,7 +285,7 @@ bool Parser::ParseTopLevelDecl(DeclTy*& Result) {
/// external-declaration
/// translation-unit external-declaration
void Parser::ParseTranslationUnit() {
- Initialize();
+ Initialize(); // pushes a scope.
DeclTy *Res;
while (!ParseTopLevelDecl(Res))
@@ -293,6 +293,8 @@ void Parser::ParseTranslationUnit() {
ExitScope();
assert(CurScope == 0 && "Scope imbalance!");
+
+ Actions.ActOnEndOfTranslationUnit();
}
/// ParseExternalDeclaration:
OpenPOWER on IntegriCloud