]> granicus.if.org Git - clang/commitdiff
Remove the unused Parser::ParseTranslationUnit function
authorHal Finkel <hfinkel@anl.gov>
Wed, 9 Jan 2013 21:49:51 +0000 (21:49 +0000)
committerHal Finkel <hfinkel@anl.gov>
Wed, 9 Jan 2013 21:49:51 +0000 (21:49 +0000)
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
lib/Parse/Parser.cpp

index f90e6a85bb422a5cf03a2c4d732304cd4c82eedd..c4b1bdcefa8201b28e90e499daff380d7a24d3c4 100644 (file)
@@ -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();
index ae5394be28361792d7bedcbf6e24e993f7e059c1..cc0d1d2fd1af67765dcde4ff6bdd987917930631 100644 (file)
@@ -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]