[cfe-commits] r39107 - in /cfe/cfe/trunk: AST/ASTStreamer.cpp AST/Expr.cpp AST/Sema.cpp AST/Sema.h Driver/clang.cpp Sema/ASTStreamer.cpp Sema/Sema.cpp Sema/Sema.h clang.xcodeproj/project.pbxproj include/clang/AST/ASTStreamer.h include/clang/AST/Expr.h include/clang/Sema/ASTStreamer.h

sabre at cs.uiuc.edu sabre at cs.uiuc.edu
Wed Jul 11 09:27:35 PDT 2007


Author: sabre
Date: Wed Jul 11 11:27:34 2007
New Revision: 39107

URL: http://llvm.org/viewvc/llvm-project?rev=39107&view=rev
Log:
remove full locinfo AST nodes for now.  They just clutter the implementation
and should be implemented with an ASTBuilder subclass anyway.

Modified:
    cfe/cfe/trunk/AST/ASTStreamer.cpp
    cfe/cfe/trunk/AST/Expr.cpp
    cfe/cfe/trunk/AST/Sema.cpp
    cfe/cfe/trunk/AST/Sema.h
    cfe/cfe/trunk/Driver/clang.cpp
    cfe/cfe/trunk/Sema/ASTStreamer.cpp
    cfe/cfe/trunk/Sema/Sema.cpp
    cfe/cfe/trunk/Sema/Sema.h
    cfe/cfe/trunk/clang.xcodeproj/project.pbxproj
    cfe/cfe/trunk/include/clang/AST/ASTStreamer.h
    cfe/cfe/trunk/include/clang/AST/Expr.h
    cfe/cfe/trunk/include/clang/Sema/ASTStreamer.h

Modified: cfe/cfe/trunk/AST/ASTStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/AST/ASTStreamer.cpp?rev=39107&r1=39106&r2=39107&view=diff

==============================================================================
--- cfe/cfe/trunk/AST/ASTStreamer.cpp (original)
+++ cfe/cfe/trunk/AST/ASTStreamer.cpp Wed Jul 11 11:27:34 2007
@@ -23,8 +23,8 @@
     Parser P;
     std::vector<Decl*> LastInGroupList;
   public:
-    ASTStreamer(Preprocessor &PP, unsigned MainFileID, bool FullLocInfo)
-      : P(PP, *new ASTBuilder(PP, FullLocInfo, LastInGroupList)) {
+    ASTStreamer(Preprocessor &PP, unsigned MainFileID)
+      : P(PP, *new ASTBuilder(PP, LastInGroupList)) {
       PP.EnterSourceFile(MainFileID, 0, true);
       
       // Initialize the parser.
@@ -80,9 +80,8 @@
 /// ASTStreamer_Init - Create an ASTStreamer with the specified preprocessor
 /// and FileID.
 ASTStreamerTy *llvm::clang::ASTStreamer_Init(Preprocessor &PP, 
-                                             unsigned MainFileID,
-                                             bool FullLocInfo) {
-  return new ASTStreamer(PP, MainFileID, FullLocInfo);
+                                             unsigned MainFileID) {
+  return new ASTStreamer(PP, MainFileID);
 }
 
 /// ASTStreamer_ReadTopLevelDecl - Parse and return one top-level declaration. This

Modified: cfe/cfe/trunk/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/AST/Expr.cpp?rev=39107&r1=39106&r2=39107&view=diff

==============================================================================
--- cfe/cfe/trunk/AST/Expr.cpp (original)
+++ cfe/cfe/trunk/AST/Expr.cpp Wed Jul 11 11:27:34 2007
@@ -148,20 +148,6 @@
   std::cerr << ")";
 }
 
-CallExprLOC::CallExprLOC(Expr *Fn, SourceLocation lparenloc, Expr **Args, 
-                         unsigned NumArgs, SourceLocation *commalocs,
-                         SourceLocation rparenloc)
-  : CallExpr(Fn, Args, NumArgs), LParenLoc(lparenloc), RParenLoc(rparenloc) {
-  unsigned NumCommas = getNumCommas();
-  if (NumCommas)
-    CommaLocs = new SourceLocation[NumCommas];
-  else
-    CommaLocs = 0;
-  
-  for (unsigned i = 0; i != NumCommas; ++i)
-    CommaLocs[i] = commalocs[i];
-}
-
 
 void MemberExpr::dump_impl() const {
   Base->dump();

Modified: cfe/cfe/trunk/AST/Sema.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/AST/Sema.cpp?rev=39107&r1=39106&r2=39107&view=diff

==============================================================================
--- cfe/cfe/trunk/AST/Sema.cpp (original)
+++ cfe/cfe/trunk/AST/Sema.cpp Wed Jul 11 11:27:34 2007
@@ -91,7 +91,7 @@
 Action::StmtResult 
 ASTBuilder::ParseCompoundStmt(SourceLocation L, SourceLocation R,
                               StmtTy **Elts, unsigned NumElts) {
-  if (FullLocInfo || NumElts > 1)
+  if (NumElts > 1)
     return new CompoundStmt((Stmt**)Elts, NumElts);
   else if (NumElts == 1)
     return Elts[0];        // {stmt} -> stmt
@@ -146,9 +146,7 @@
 Action::ExprResult ASTBuilder::ParseParenExpr(SourceLocation L, 
                                               SourceLocation R,
                                               ExprTy *Val) {
-  if (!FullLocInfo) return Val;
-  
-  return new ParenExpr(L, R, (Expr*)Val);
+  return Val;
 }
 
 /// ParseStringExpr - This accepts a string after semantic analysis. This string
@@ -159,11 +157,7 @@
 ParseStringExpr(const char *StrData, unsigned StrLen, bool isWide,
                 SourceLocation *TokLocs, unsigned NumToks) {
   assert(NumToks && "Must have at least one string!");
-  
-  if (!FullLocInfo)
-    return new StringExpr(StrData, StrLen, isWide);
-  else
-    return new StringExprLOC(StrData, StrLen, isWide, TokLocs, NumToks);
+  return new StringExpr(StrData, StrLen, isWide);
 }
 
 
@@ -188,26 +182,19 @@
   case tok::kw___imag:    Opc = UnaryOperator::Imag; break;
   case tok::ampamp:       Opc = UnaryOperator::AddrLabel; break;
   case tok::kw___extension__: 
-    if (!FullLocInfo) return Input;
-    Opc = UnaryOperator::Extension;
-    break;
+    return Input;
+    //Opc = UnaryOperator::Extension;
+    //break;
   }
 
-  if (!FullLocInfo)
-    return new UnaryOperator((Expr*)Input, Opc);
-  else
-    return new UnaryOperatorLOC(OpLoc, (Expr*)Input, Opc);
+  return new UnaryOperator((Expr*)Input, Opc);
 }
 
 Action::ExprResult ASTBuilder::
 ParseSizeOfAlignOfTypeExpr(SourceLocation OpLoc, bool isSizeof, 
                            SourceLocation LParenLoc, TypeTy *Ty,
                            SourceLocation RParenLoc) {
-  if (!FullLocInfo)
-    return new SizeOfAlignOfTypeExpr(isSizeof, (Type*)Ty);
-  else
-    return new SizeOfAlignOfTypeExprLOC(OpLoc, isSizeof, LParenLoc, (Type*)Ty,
-                                        RParenLoc);
+  return new SizeOfAlignOfTypeExpr(isSizeof, (Type*)Ty);
 }
 
 
@@ -221,19 +208,13 @@
   case tok::minusminus: Opc = UnaryOperator::PostDec; break;
   }
   
-  if (!FullLocInfo)
-    return new UnaryOperator((Expr*)Input, Opc);
-  else
-    return new UnaryOperatorLOC(OpLoc, (Expr*)Input, Opc);
+  return new UnaryOperator((Expr*)Input, Opc);
 }
 
 Action::ExprResult ASTBuilder::
 ParseArraySubscriptExpr(ExprTy *Base, SourceLocation LLoc,
                         ExprTy *Idx, SourceLocation RLoc) {
-  if (!FullLocInfo)
-    return new ArraySubscriptExpr((Expr*)Base, (Expr*)Idx);
-  else
-    return new ArraySubscriptExprLOC((Expr*)Base, LLoc, (Expr*)Idx, RLoc);
+  return new ArraySubscriptExpr((Expr*)Base, (Expr*)Idx);
 }
 
 Action::ExprResult ASTBuilder::
@@ -242,11 +223,7 @@
                          IdentifierInfo &Member) {
   Decl *MemberDecl = 0;
   // TODO: Look up MemberDecl.
-  if (!FullLocInfo)
-    return new MemberExpr((Expr*)Base, OpKind == tok::arrow, MemberDecl);
-  else
-    return new MemberExprLOC((Expr*)Base, OpLoc, OpKind == tok::arrow,
-                             MemberLoc, MemberDecl);
+  return new MemberExpr((Expr*)Base, OpKind == tok::arrow, MemberDecl);
 }
 
 /// ParseCallExpr - Handle a call to Fn with the specified array of arguments.
@@ -256,20 +233,13 @@
 ParseCallExpr(ExprTy *Fn, SourceLocation LParenLoc,
               ExprTy **Args, unsigned NumArgs,
               SourceLocation *CommaLocs, SourceLocation RParenLoc) {
-  if (!FullLocInfo)
-    return new CallExpr((Expr*)Fn, (Expr**)Args, NumArgs);
-  else
-    return new CallExprLOC((Expr*)Fn, LParenLoc, (Expr**)Args, NumArgs,
-                           CommaLocs, RParenLoc);
+  return new CallExpr((Expr*)Fn, (Expr**)Args, NumArgs);
 }
 
 Action::ExprResult ASTBuilder::
 ParseCastExpr(SourceLocation LParenLoc, TypeTy *Ty,
               SourceLocation RParenLoc, ExprTy *Op) {
-  if (!FullLocInfo)
-    return new CastExpr((Type*)Ty, (Expr*)Op);
-  else
-    return new CastExprLOC(LParenLoc, (Type*)Ty, RParenLoc, (Expr*)Op);
+  return new CastExpr((Type*)Ty, (Expr*)Op);
 }
 
 
@@ -313,10 +283,7 @@
   case tok::comma:                Opc = BinaryOperator::Comma; break;
   }
   
-  if (!FullLocInfo)
-    return new BinaryOperator((Expr*)LHS, (Expr*)RHS, Opc);
-  else
-    return new BinaryOperatorLOC((Expr*)LHS, TokLoc, (Expr*)RHS, Opc);
+  return new BinaryOperator((Expr*)LHS, (Expr*)RHS, Opc);
 }
 
 /// ParseConditionalOp - Parse a ?: operation.  Note that 'LHS' may be null
@@ -325,10 +292,6 @@
                                                   SourceLocation ColonLoc,
                                                   ExprTy *Cond, ExprTy *LHS,
                                                   ExprTy *RHS) {
-  if (!FullLocInfo)
-    return new ConditionalOperator((Expr*)Cond, (Expr*)LHS, (Expr*)RHS);
-  else
-    return new ConditionalOperatorLOC((Expr*)Cond, QuestionLoc, (Expr*)LHS,
-                                      ColonLoc, (Expr*)RHS);
+  return new ConditionalOperator((Expr*)Cond, (Expr*)LHS, (Expr*)RHS);
 }
 

Modified: cfe/cfe/trunk/AST/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/AST/Sema.h?rev=39107&r1=39106&r2=39107&view=diff

==============================================================================
--- cfe/cfe/trunk/AST/Sema.h (original)
+++ cfe/cfe/trunk/AST/Sema.h Wed Jul 11 11:27:34 2007
@@ -29,19 +29,14 @@
 class ASTBuilder : public Action {
   Preprocessor &PP;
   
-  /// FullLocInfo - If this is true, the ASTBuilder constructs AST Nodes that
-  /// capture maximal location information for each source-language construct.
-  bool FullLocInfo;
-  
   /// LastInGroupList - This vector is populated when there are multiple
   /// declarators in a single decl group (e.g. "int A, B, C").  In this case,
   /// all but the last decl will be entered into this.  This is used by the
   /// ASTStreamer.
   std::vector<Decl*> &LastInGroupList;
 public:
-  ASTBuilder(Preprocessor &pp, bool fullLocInfo,
-             std::vector<Decl*> &prevInGroup)
-    : PP(pp), FullLocInfo(fullLocInfo), LastInGroupList(prevInGroup) {}
+  ASTBuilder(Preprocessor &pp, std::vector<Decl*> &prevInGroup)
+    : PP(pp), LastInGroupList(prevInGroup) {}
   
   //===--------------------------------------------------------------------===//
   // Symbol table tracking callbacks.
@@ -59,7 +54,6 @@
   virtual StmtResult ParseCompoundStmt(SourceLocation L, SourceLocation R,
                                        StmtTy **Elts, unsigned NumElts);
   virtual StmtResult ParseExprStmt(ExprTy *Expr) {
-    // TODO: Full info should track this with a node.
     return Expr; // Exprs are Stmts.
   }
   

Modified: cfe/cfe/trunk/Driver/clang.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Driver/clang.cpp?rev=39107&r1=39106&r2=39107&view=diff

==============================================================================
--- cfe/cfe/trunk/Driver/clang.cpp (original)
+++ cfe/cfe/trunk/Driver/clang.cpp Wed Jul 11 11:27:34 2007
@@ -785,7 +785,7 @@
 //===----------------------------------------------------------------------===//
 
 static void PrintASTs(Preprocessor &PP, unsigned MainFileID) {
-  ASTStreamerTy *Streamer = ASTStreamer_Init(PP, MainFileID, true);
+  ASTStreamerTy *Streamer = ASTStreamer_Init(PP, MainFileID);
   
   while (Decl *D = ASTStreamer_ReadTopLevelDecl(Streamer)) {
     std::cerr << "Read top-level decl: '";

Modified: cfe/cfe/trunk/Sema/ASTStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Sema/ASTStreamer.cpp?rev=39107&r1=39106&r2=39107&view=diff

==============================================================================
--- cfe/cfe/trunk/Sema/ASTStreamer.cpp (original)
+++ cfe/cfe/trunk/Sema/ASTStreamer.cpp Wed Jul 11 11:27:34 2007
@@ -23,8 +23,8 @@
     Parser P;
     std::vector<Decl*> LastInGroupList;
   public:
-    ASTStreamer(Preprocessor &PP, unsigned MainFileID, bool FullLocInfo)
-      : P(PP, *new ASTBuilder(PP, FullLocInfo, LastInGroupList)) {
+    ASTStreamer(Preprocessor &PP, unsigned MainFileID)
+      : P(PP, *new ASTBuilder(PP, LastInGroupList)) {
       PP.EnterSourceFile(MainFileID, 0, true);
       
       // Initialize the parser.
@@ -80,9 +80,8 @@
 /// ASTStreamer_Init - Create an ASTStreamer with the specified preprocessor
 /// and FileID.
 ASTStreamerTy *llvm::clang::ASTStreamer_Init(Preprocessor &PP, 
-                                             unsigned MainFileID,
-                                             bool FullLocInfo) {
-  return new ASTStreamer(PP, MainFileID, FullLocInfo);
+                                             unsigned MainFileID) {
+  return new ASTStreamer(PP, MainFileID);
 }
 
 /// ASTStreamer_ReadTopLevelDecl - Parse and return one top-level declaration. This

Modified: cfe/cfe/trunk/Sema/Sema.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Sema/Sema.cpp?rev=39107&r1=39106&r2=39107&view=diff

==============================================================================
--- cfe/cfe/trunk/Sema/Sema.cpp (original)
+++ cfe/cfe/trunk/Sema/Sema.cpp Wed Jul 11 11:27:34 2007
@@ -91,7 +91,7 @@
 Action::StmtResult 
 ASTBuilder::ParseCompoundStmt(SourceLocation L, SourceLocation R,
                               StmtTy **Elts, unsigned NumElts) {
-  if (FullLocInfo || NumElts > 1)
+  if (NumElts > 1)
     return new CompoundStmt((Stmt**)Elts, NumElts);
   else if (NumElts == 1)
     return Elts[0];        // {stmt} -> stmt
@@ -146,9 +146,7 @@
 Action::ExprResult ASTBuilder::ParseParenExpr(SourceLocation L, 
                                               SourceLocation R,
                                               ExprTy *Val) {
-  if (!FullLocInfo) return Val;
-  
-  return new ParenExpr(L, R, (Expr*)Val);
+  return Val;
 }
 
 /// ParseStringExpr - This accepts a string after semantic analysis. This string
@@ -159,11 +157,7 @@
 ParseStringExpr(const char *StrData, unsigned StrLen, bool isWide,
                 SourceLocation *TokLocs, unsigned NumToks) {
   assert(NumToks && "Must have at least one string!");
-  
-  if (!FullLocInfo)
-    return new StringExpr(StrData, StrLen, isWide);
-  else
-    return new StringExprLOC(StrData, StrLen, isWide, TokLocs, NumToks);
+  return new StringExpr(StrData, StrLen, isWide);
 }
 
 
@@ -188,26 +182,19 @@
   case tok::kw___imag:    Opc = UnaryOperator::Imag; break;
   case tok::ampamp:       Opc = UnaryOperator::AddrLabel; break;
   case tok::kw___extension__: 
-    if (!FullLocInfo) return Input;
-    Opc = UnaryOperator::Extension;
-    break;
+    return Input;
+    //Opc = UnaryOperator::Extension;
+    //break;
   }
 
-  if (!FullLocInfo)
-    return new UnaryOperator((Expr*)Input, Opc);
-  else
-    return new UnaryOperatorLOC(OpLoc, (Expr*)Input, Opc);
+  return new UnaryOperator((Expr*)Input, Opc);
 }
 
 Action::ExprResult ASTBuilder::
 ParseSizeOfAlignOfTypeExpr(SourceLocation OpLoc, bool isSizeof, 
                            SourceLocation LParenLoc, TypeTy *Ty,
                            SourceLocation RParenLoc) {
-  if (!FullLocInfo)
-    return new SizeOfAlignOfTypeExpr(isSizeof, (Type*)Ty);
-  else
-    return new SizeOfAlignOfTypeExprLOC(OpLoc, isSizeof, LParenLoc, (Type*)Ty,
-                                        RParenLoc);
+  return new SizeOfAlignOfTypeExpr(isSizeof, (Type*)Ty);
 }
 
 
@@ -221,19 +208,13 @@
   case tok::minusminus: Opc = UnaryOperator::PostDec; break;
   }
   
-  if (!FullLocInfo)
-    return new UnaryOperator((Expr*)Input, Opc);
-  else
-    return new UnaryOperatorLOC(OpLoc, (Expr*)Input, Opc);
+  return new UnaryOperator((Expr*)Input, Opc);
 }
 
 Action::ExprResult ASTBuilder::
 ParseArraySubscriptExpr(ExprTy *Base, SourceLocation LLoc,
                         ExprTy *Idx, SourceLocation RLoc) {
-  if (!FullLocInfo)
-    return new ArraySubscriptExpr((Expr*)Base, (Expr*)Idx);
-  else
-    return new ArraySubscriptExprLOC((Expr*)Base, LLoc, (Expr*)Idx, RLoc);
+  return new ArraySubscriptExpr((Expr*)Base, (Expr*)Idx);
 }
 
 Action::ExprResult ASTBuilder::
@@ -242,11 +223,7 @@
                          IdentifierInfo &Member) {
   Decl *MemberDecl = 0;
   // TODO: Look up MemberDecl.
-  if (!FullLocInfo)
-    return new MemberExpr((Expr*)Base, OpKind == tok::arrow, MemberDecl);
-  else
-    return new MemberExprLOC((Expr*)Base, OpLoc, OpKind == tok::arrow,
-                             MemberLoc, MemberDecl);
+  return new MemberExpr((Expr*)Base, OpKind == tok::arrow, MemberDecl);
 }
 
 /// ParseCallExpr - Handle a call to Fn with the specified array of arguments.
@@ -256,20 +233,13 @@
 ParseCallExpr(ExprTy *Fn, SourceLocation LParenLoc,
               ExprTy **Args, unsigned NumArgs,
               SourceLocation *CommaLocs, SourceLocation RParenLoc) {
-  if (!FullLocInfo)
-    return new CallExpr((Expr*)Fn, (Expr**)Args, NumArgs);
-  else
-    return new CallExprLOC((Expr*)Fn, LParenLoc, (Expr**)Args, NumArgs,
-                           CommaLocs, RParenLoc);
+  return new CallExpr((Expr*)Fn, (Expr**)Args, NumArgs);
 }
 
 Action::ExprResult ASTBuilder::
 ParseCastExpr(SourceLocation LParenLoc, TypeTy *Ty,
               SourceLocation RParenLoc, ExprTy *Op) {
-  if (!FullLocInfo)
-    return new CastExpr((Type*)Ty, (Expr*)Op);
-  else
-    return new CastExprLOC(LParenLoc, (Type*)Ty, RParenLoc, (Expr*)Op);
+  return new CastExpr((Type*)Ty, (Expr*)Op);
 }
 
 
@@ -313,10 +283,7 @@
   case tok::comma:                Opc = BinaryOperator::Comma; break;
   }
   
-  if (!FullLocInfo)
-    return new BinaryOperator((Expr*)LHS, (Expr*)RHS, Opc);
-  else
-    return new BinaryOperatorLOC((Expr*)LHS, TokLoc, (Expr*)RHS, Opc);
+  return new BinaryOperator((Expr*)LHS, (Expr*)RHS, Opc);
 }
 
 /// ParseConditionalOp - Parse a ?: operation.  Note that 'LHS' may be null
@@ -325,10 +292,6 @@
                                                   SourceLocation ColonLoc,
                                                   ExprTy *Cond, ExprTy *LHS,
                                                   ExprTy *RHS) {
-  if (!FullLocInfo)
-    return new ConditionalOperator((Expr*)Cond, (Expr*)LHS, (Expr*)RHS);
-  else
-    return new ConditionalOperatorLOC((Expr*)Cond, QuestionLoc, (Expr*)LHS,
-                                      ColonLoc, (Expr*)RHS);
+  return new ConditionalOperator((Expr*)Cond, (Expr*)LHS, (Expr*)RHS);
 }
 

Modified: cfe/cfe/trunk/Sema/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Sema/Sema.h?rev=39107&r1=39106&r2=39107&view=diff

==============================================================================
--- cfe/cfe/trunk/Sema/Sema.h (original)
+++ cfe/cfe/trunk/Sema/Sema.h Wed Jul 11 11:27:34 2007
@@ -29,19 +29,14 @@
 class ASTBuilder : public Action {
   Preprocessor &PP;
   
-  /// FullLocInfo - If this is true, the ASTBuilder constructs AST Nodes that
-  /// capture maximal location information for each source-language construct.
-  bool FullLocInfo;
-  
   /// LastInGroupList - This vector is populated when there are multiple
   /// declarators in a single decl group (e.g. "int A, B, C").  In this case,
   /// all but the last decl will be entered into this.  This is used by the
   /// ASTStreamer.
   std::vector<Decl*> &LastInGroupList;
 public:
-  ASTBuilder(Preprocessor &pp, bool fullLocInfo,
-             std::vector<Decl*> &prevInGroup)
-    : PP(pp), FullLocInfo(fullLocInfo), LastInGroupList(prevInGroup) {}
+  ASTBuilder(Preprocessor &pp, std::vector<Decl*> &prevInGroup)
+    : PP(pp), LastInGroupList(prevInGroup) {}
   
   //===--------------------------------------------------------------------===//
   // Symbol table tracking callbacks.
@@ -59,7 +54,6 @@
   virtual StmtResult ParseCompoundStmt(SourceLocation L, SourceLocation R,
                                        StmtTy **Elts, unsigned NumElts);
   virtual StmtResult ParseExprStmt(ExprTy *Expr) {
-    // TODO: Full info should track this with a node.
     return Expr; // Exprs are Stmts.
   }
   

Modified: cfe/cfe/trunk/clang.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/clang.xcodeproj/project.pbxproj?rev=39107&r1=39106&r2=39107&view=diff

==============================================================================
--- cfe/cfe/trunk/clang.xcodeproj/project.pbxproj (original)
+++ cfe/cfe/trunk/clang.xcodeproj/project.pbxproj Wed Jul 11 11:27:34 2007
@@ -30,6 +30,7 @@
 		DE345B500AFB1CFE00DBC861 /* ASTBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE345B4F0AFB1CFE00DBC861 /* ASTBuilder.cpp */; };
 		DE345C1A0AFC658B00DBC861 /* StmtVisitor.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE345C190AFC658B00DBC861 /* StmtVisitor.h */; };
 		DE345C570AFC69E800DBC861 /* StmtVisitor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE345C560AFC69E800DBC861 /* StmtVisitor.cpp */; };
+		DE345C780AFC6BE600DBC861 /* ASTBuilder.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE345C770AFC6BE600DBC861 /* ASTBuilder.h */; };
 		DE46BF280AE0A82D00CC047C /* TargetInfo.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE46BF270AE0A82D00CC047C /* TargetInfo.h */; };
 		DE5932D10AD60FF400BC794C /* clang.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE5932CD0AD60FF400BC794C /* clang.cpp */; };
 		DE5932D20AD60FF400BC794C /* clang.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE5932CE0AD60FF400BC794C /* clang.h */; };
@@ -116,6 +117,7 @@
 				DE3450D70AEB543100DBC861 /* DirectoryLookup.h in CopyFiles */,
 				DE3452810AEF1B1800DBC861 /* Stmt.h in CopyFiles */,
 				DE345C1A0AFC658B00DBC861 /* StmtVisitor.h in CopyFiles */,
+				DE345C780AFC6BE600DBC861 /* ASTBuilder.h in CopyFiles */,
 			);
 			runOnlyForDeploymentPostprocessing = 1;
 		};
@@ -146,6 +148,7 @@
 		DE345B4F0AFB1CFE00DBC861 /* ASTBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ASTBuilder.cpp; path = AST/ASTBuilder.cpp; sourceTree = "<group>"; };
 		DE345C190AFC658B00DBC861 /* StmtVisitor.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = StmtVisitor.h; path = clang/AST/StmtVisitor.h; sourceTree = "<group>"; };
 		DE345C560AFC69E800DBC861 /* StmtVisitor.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = StmtVisitor.cpp; path = AST/StmtVisitor.cpp; sourceTree = "<group>"; };
+		DE345C770AFC6BE600DBC861 /* ASTBuilder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ASTBuilder.h; path = clang/AST/ASTBuilder.h; sourceTree = "<group>"; };
 		DE46BF270AE0A82D00CC047C /* TargetInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetInfo.h; sourceTree = "<group>"; };
 		DE5932CD0AD60FF400BC794C /* clang.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = clang.cpp; path = Driver/clang.cpp; sourceTree = "<group>"; };
 		DE5932CE0AD60FF400BC794C /* clang.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = clang.h; path = Driver/clang.h; sourceTree = "<group>"; };
@@ -284,6 +287,7 @@
 			isa = PBXGroup;
 			children = (
 				DEC8D9A30A94346E00353FCA /* AST.h */,
+				DE345C770AFC6BE600DBC861 /* ASTBuilder.h */,
 				DEC8DABF0A94402500353FCA /* ASTStreamer.h */,
 				DEC8D9900A9433CD00353FCA /* Decl.h */,
 				DE0FCA620A95859D00248FD5 /* Expr.h */,

Modified: cfe/cfe/trunk/include/clang/AST/ASTStreamer.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/include/clang/AST/ASTStreamer.h?rev=39107&r1=39106&r2=39107&view=diff

==============================================================================
--- cfe/cfe/trunk/include/clang/AST/ASTStreamer.h (original)
+++ cfe/cfe/trunk/include/clang/AST/ASTStreamer.h Wed Jul 11 11:27:34 2007
@@ -27,8 +27,7 @@
   /// and FileID.  If FullLocInfo is true, full location information is captured
   /// in the AST nodes.  This takes more space, but allows for very accurate
   /// position reporting.
-  ASTStreamerTy *ASTStreamer_Init(Preprocessor &PP, unsigned MainFileID,
-                                  bool FullLocInfo = false);
+  ASTStreamerTy *ASTStreamer_Init(Preprocessor &PP, unsigned MainFileID);
   
   /// ASTStreamer_ReadTopLevelDecl - Parse and return one top-level declaration.
   /// This returns null at end of file.

Modified: cfe/cfe/trunk/include/clang/AST/Expr.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/include/clang/AST/Expr.h?rev=39107&r1=39106&r2=39107&view=diff

==============================================================================
--- cfe/cfe/trunk/include/clang/AST/Expr.h (original)
+++ cfe/cfe/trunk/include/clang/AST/Expr.h Wed Jul 11 11:27:34 2007
@@ -78,16 +78,6 @@
   virtual void visit(StmtVisitor *Visitor);
 };
 
-class StringExprLOC : public StringExpr {
-  // Locations for the string tokens before string concatenation.
-  SmallVector<SourceLocation, 4> Locs;
-public:
-  StringExprLOC(const char *StrData, unsigned ByteLength, bool isWide,
-                SourceLocation *L, unsigned NumLocs)
-    : StringExpr(StrData, ByteLength, isWide), Locs(L, L+NumLocs) {
-  }
-};
-
 /// ParenExpr - This represents a parethesized expression, e.g. "(1)".  This
 /// AST node is only formed if full location information is requested.
 class ParenExpr : public Expr {
@@ -133,13 +123,6 @@
   Opcode Opc;
 };
 
-class UnaryOperatorLOC : public UnaryOperator {
-  SourceLocation Loc;
-public:
-  UnaryOperatorLOC(SourceLocation loc, Expr *Input, Opcode Opc)
-   : UnaryOperator(Input, Opc), Loc(loc) {}
-};
-
 /// SizeOfAlignOfTypeExpr - [C99 6.5.3.4] - This is only for sizeof/alignof of
 /// *types*.  sizeof(expr) is handled by UnaryOperator.
 class SizeOfAlignOfTypeExpr : public Expr {
@@ -153,17 +136,6 @@
   virtual void visit(StmtVisitor *Visitor);
 };
 
-class SizeOfAlignOfTypeExprLOC : public SizeOfAlignOfTypeExpr {
-  SourceLocation OpLoc, LParenLoc, RParenLoc;
-public:
-  SizeOfAlignOfTypeExprLOC(SourceLocation oploc, bool isSizeof, 
-                           SourceLocation lparenloc, Type *Ty,
-                           SourceLocation rparenloc)
-    : SizeOfAlignOfTypeExpr(isSizeof, Ty), OpLoc(oploc), LParenLoc(lparenloc),
-      RParenLoc(rparenloc) {
-  }
-};
-
 //===----------------------------------------------------------------------===//
 // Postfix Operators.
 //===----------------------------------------------------------------------===//
@@ -179,14 +151,6 @@
 };
 
 
-class ArraySubscriptExprLOC : public ArraySubscriptExpr {
-  SourceLocation LLoc, RLoc;
-public:
-  ArraySubscriptExprLOC(Expr *Base, SourceLocation lloc, Expr *Idx, 
-                        SourceLocation rloc)
-    : ArraySubscriptExpr(Base, Idx), LLoc(lloc), RLoc(rloc) {}
-};
-
 /// CallExpr - [C99 6.5.2.2] Function Calls.
 ///
 class CallExpr : public Expr {
@@ -217,17 +181,6 @@
   virtual void visit(StmtVisitor *Visitor);
 };
 
-class CallExprLOC : public CallExpr {
-  SourceLocation LParenLoc, RParenLoc;
-  SourceLocation *CommaLocs;
-public:
-  CallExprLOC(Expr *Fn, SourceLocation lparenloc, Expr **Args, unsigned NumArgs,
-              SourceLocation *commalocs, SourceLocation rparenloc);
-  ~CallExprLOC() {
-    delete [] CommaLocs;
-  }
-};
-
 /// MemberExpr - [C99 6.5.2.3] Structure and Union Members.
 ///
 class MemberExpr : public Expr {
@@ -242,16 +195,6 @@
   virtual void visit(StmtVisitor *Visitor);
 };
 
-class MemberExprLOC : public MemberExpr {
-  SourceLocation OpLoc, MemberLoc;
-public:
-  MemberExprLOC(Expr *Base, SourceLocation oploc, bool isArrow,
-                SourceLocation memberLoc, Decl *MemberDecl) 
-    : MemberExpr(Base, isArrow, MemberDecl), OpLoc(oploc), MemberLoc(memberLoc){
-  }
-
-};
-
 /// CastExpr - [C99 6.5.4] Cast Operators.
 ///
 class CastExpr : public Expr {
@@ -264,15 +207,6 @@
   virtual void visit(StmtVisitor *Visitor);
 };
 
-class CastExprLOC : public CastExpr {
-  SourceLocation LParenLoc, RParenLoc;
-public:
-  CastExprLOC(SourceLocation lparenloc, Type *Ty, SourceLocation rparenloc,
-              Expr *Op)
-  : CastExpr(Ty, Op), LParenLoc(lparenloc), RParenLoc(rparenloc) {
-  }
-};
-
 
 class BinaryOperator : public Expr {
 public:
@@ -312,14 +246,6 @@
   Opcode Opc;
 };
 
-class BinaryOperatorLOC : public BinaryOperator {
-  SourceLocation OperatorLoc;
-public:
-  BinaryOperatorLOC(Expr *LHS, SourceLocation OpLoc, Expr *RHS, Opcode Opc)
-    : BinaryOperator(LHS, RHS, Opc), OperatorLoc(OpLoc) {
-  }
-};
-
 /// ConditionalOperator - The ?: operator.  Note that LHS may be null when the
 /// GNU "missing LHS" extension is in use.
 ///
@@ -332,16 +258,6 @@
   virtual void visit(StmtVisitor *Visitor);
 };
 
-/// ConditionalOperatorLOC - ConditionalOperator with full location info.
-///
-class ConditionalOperatorLOC : public ConditionalOperator {
-  SourceLocation QuestionLoc, ColonLoc;
-public:
-  ConditionalOperatorLOC(Expr *Cond, SourceLocation QLoc, Expr *LHS,
-                         SourceLocation CLoc, Expr *RHS)
-    : ConditionalOperator(Cond, LHS, RHS), QuestionLoc(QLoc), ColonLoc(CLoc) {}
-};
-
   
 }  // end namespace clang
 }  // end namespace llvm

Modified: cfe/cfe/trunk/include/clang/Sema/ASTStreamer.h
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/include/clang/Sema/ASTStreamer.h?rev=39107&r1=39106&r2=39107&view=diff

==============================================================================
--- cfe/cfe/trunk/include/clang/Sema/ASTStreamer.h (original)
+++ cfe/cfe/trunk/include/clang/Sema/ASTStreamer.h Wed Jul 11 11:27:34 2007
@@ -27,8 +27,7 @@
   /// and FileID.  If FullLocInfo is true, full location information is captured
   /// in the AST nodes.  This takes more space, but allows for very accurate
   /// position reporting.
-  ASTStreamerTy *ASTStreamer_Init(Preprocessor &PP, unsigned MainFileID,
-                                  bool FullLocInfo = false);
+  ASTStreamerTy *ASTStreamer_Init(Preprocessor &PP, unsigned MainFileID);
   
   /// ASTStreamer_ReadTopLevelDecl - Parse and return one top-level declaration.
   /// This returns null at end of file.





More information about the cfe-commits mailing list