From 898dd70865e42962fbeba346f7abcdc937664e2b Mon Sep 17 00:00:00 2001 From: Hal Finkel Date: Wed, 9 Jan 2013 21:49:51 +0000 Subject: [PATCH] Remove the unused Parser::ParseTranslationUnit function Parser::ParseTranslationUnit is now dead because the loop over ParseTopLevelDecl is in ParseAST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172005 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Parse/Parser.h | 4 ---- lib/Parse/Parser.cpp | 15 --------------- 2 files changed, 19 deletions(-) diff --git a/include/clang/Parse/Parser.h b/include/clang/Parse/Parser.h index f90e6a85bb..c4b1bdcefa 100644 --- a/include/clang/Parse/Parser.h +++ b/include/clang/Parse/Parser.h @@ -233,10 +233,6 @@ public: // Parsing methods. - /// ParseTranslationUnit - All in one method that initializes parses, and - /// shuts down the parser. - void ParseTranslationUnit(); - /// Initialize - Warm up the parser. /// void Initialize(); diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp index ae5394be28..cc0d1d2fd1 100644 --- a/lib/Parse/Parser.cpp +++ b/lib/Parse/Parser.cpp @@ -561,21 +561,6 @@ bool Parser::ParseTopLevelDecl(DeclGroupPtrTy &Result) { return false; } -/// ParseTranslationUnit: -/// translation-unit: [C99 6.9] -/// external-declaration -/// translation-unit external-declaration -void Parser::ParseTranslationUnit() { - Initialize(); - - DeclGroupPtrTy Res; - while (!ParseTopLevelDecl(Res)) - /*parse them all*/; - - ExitScope(); - assert(getCurScope() == 0 && "Scope imbalance!"); -} - /// ParseExternalDeclaration: /// /// external-declaration: [C99 6.9], declaration: [C++ dcl.dcl] -- 2.40.0