forked from OSchip/llvm-project
add action to know about end of translation unit.
llvm-svn: 55218
This commit is contained in:
parent
ce90ef51b9
commit
9e8c057ab7
|
@ -181,6 +181,8 @@ public:
|
|||
return 0;
|
||||
}
|
||||
|
||||
virtual void ActOnEndOfTranslationUnit() {}
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
// Type Parsing Callbacks.
|
||||
//===--------------------------------------------------------------------===//
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue