[cfe-commits] r103087 - in /cfe/trunk: include/clang/AST/Expr.h include/clang/AST/Makefile include/clang/AST/Stmt.h include/clang/AST/StmtNodes.def include/clang/AST/StmtNodes.td include/clang/AST/StmtVisitor.h include/clang/CMakeLists.txt include/clang/Makefile lib/AST/Expr.cpp lib/AST/Stmt.cpp lib/AST/StmtPrinter.cpp lib/AST/StmtProfile.cpp lib/CodeGen/Mangle.cpp lib/Sema/TreeTransform.h

Sean Hunt rideau3 at gmail.com
Wed May 5 08:24:00 PDT 2010


Author: coppro
Date: Wed May  5 10:24:00 2010
New Revision: 103087

URL: http://llvm.org/viewvc/llvm-project?rev=103087&view=rev
Log:
Reapplying patch to change StmtNodes.def to StmtNodes.td, this time
with no whitespace. This will allow statements to be referred to in
attribute TableGen files.

Added:
    cfe/trunk/include/clang/AST/Makefile
    cfe/trunk/include/clang/AST/StmtNodes.td
Removed:
    cfe/trunk/include/clang/AST/StmtNodes.def
Modified:
    cfe/trunk/include/clang/AST/Expr.h
    cfe/trunk/include/clang/AST/Stmt.h
    cfe/trunk/include/clang/AST/StmtVisitor.h
    cfe/trunk/include/clang/CMakeLists.txt
    cfe/trunk/include/clang/Makefile
    cfe/trunk/lib/AST/Expr.cpp
    cfe/trunk/lib/AST/Stmt.cpp
    cfe/trunk/lib/AST/StmtPrinter.cpp
    cfe/trunk/lib/AST/StmtProfile.cpp
    cfe/trunk/lib/CodeGen/Mangle.cpp
    cfe/trunk/lib/Sema/TreeTransform.h

Modified: cfe/trunk/include/clang/AST/Expr.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Expr.h?rev=103087&r1=103086&r2=103087&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Expr.h (original)
+++ cfe/trunk/include/clang/AST/Expr.h Wed May  5 10:24:00 2010
@@ -1468,13 +1468,10 @@
   }
 
   static bool classof(const Stmt *T) {
-    return T->getStmtClass() == CallExprClass ||
-           T->getStmtClass() == CXXOperatorCallExprClass ||
-           T->getStmtClass() == CXXMemberCallExprClass;
+    return T->getStmtClass() >= firstCallExprConstant &&
+           T->getStmtClass() <= lastCallExprConstant;
   }
   static bool classof(const CallExpr *) { return true; }
-  static bool classof(const CXXOperatorCallExpr *) { return true; }
-  static bool classof(const CXXMemberCallExpr *) { return true; }
 
   // Iterators
   virtual child_iterator child_begin();
@@ -1933,14 +1930,8 @@
   const CXXBaseSpecifierArray& getBasePath() const { return BasePath; }
 
   static bool classof(const Stmt *T) {
-    StmtClass SC = T->getStmtClass();
-    if (SC >= CXXStaticCastExprClass && SC <= CXXFunctionalCastExprClass)
-      return true;
-
-    if (SC >= ImplicitCastExprClass && SC <= CStyleCastExprClass)
-      return true;
-
-    return false;
+    return T->getStmtClass() >= firstCastExprConstant &&
+           T->getStmtClass() <= lastCastExprConstant;
   }
   static bool classof(const CastExpr *) { return true; }
 
@@ -2037,13 +2028,8 @@
   QualType getTypeAsWritten() const { return TInfo->getType(); }
 
   static bool classof(const Stmt *T) {
-    StmtClass SC = T->getStmtClass();
-    if (SC >= CStyleCastExprClass && SC <= CStyleCastExprClass)
-      return true;
-    if (SC >= CXXStaticCastExprClass && SC <= CXXFunctionalCastExprClass)
-      return true;
-
-    return false;
+     return T->getStmtClass() >= firstExplicitCastExprConstant &&
+            T->getStmtClass() <= lastExplicitCastExprConstant;
   }
   static bool classof(const ExplicitCastExpr *) { return true; }
 };
@@ -2198,8 +2184,8 @@
   bool isShiftAssignOp() const { return Opc == ShlAssign || Opc == ShrAssign; }
 
   static bool classof(const Stmt *S) {
-    return S->getStmtClass() == BinaryOperatorClass ||
-           S->getStmtClass() == CompoundAssignOperatorClass;
+    return S->getStmtClass() >= firstBinaryOperatorConstant &&
+           S->getStmtClass() <= lastBinaryOperatorConstant;
   }
   static bool classof(const BinaryOperator *) { return true; }
 

Added: cfe/trunk/include/clang/AST/Makefile
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Makefile?rev=103087&view=auto
==============================================================================
--- cfe/trunk/include/clang/AST/Makefile (added)
+++ cfe/trunk/include/clang/AST/Makefile Wed May  5 10:24:00 2010
@@ -0,0 +1,13 @@
+LEVEL = ../../../../..
+BUILT_SOURCES = StmtNodes.inc
+
+TABLEGEN_INC_FILES_COMMON = 1
+
+include $(LEVEL)/Makefile.common
+
+INPUT_TDS = $(PROJ_SRC_DIR)/StmtNodes.td
+
+$(ObjDir)/StmtNodes.inc.tmp : StmtNodes.td $(TBLGEN) $(ObjDir)/.dir
+	$(Echo) "Building Clang statement node tables with tblgen"
+	$(Verb) $(TableGen) -gen-clang-stmt-nodes -o $(call SYSPATH, $@) $<
+

Modified: cfe/trunk/include/clang/AST/Stmt.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Stmt.h?rev=103087&r1=103086&r2=103087&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Stmt.h (original)
+++ cfe/trunk/include/clang/AST/Stmt.h Wed May  5 10:24:00 2010
@@ -99,11 +99,24 @@
     NoStmtClass = 0,
 #define STMT(CLASS, PARENT) CLASS##Class,
 #define FIRST_STMT(CLASS) firstStmtConstant = CLASS##Class,
-#define LAST_STMT(CLASS) lastStmtConstant = CLASS##Class,
+// LAST_STMT will always come last
+#define LAST_STMT(CLASS) lastStmtConstant = CLASS##Class
 #define FIRST_EXPR(CLASS) firstExprConstant = CLASS##Class,
-#define LAST_EXPR(CLASS) lastExprConstant = CLASS##Class
-#define ABSTRACT_EXPR(CLASS, PARENT)
-#include "clang/AST/StmtNodes.def"
+#define LAST_EXPR(CLASS) lastExprConstant = CLASS##Class,
+#define FIRST_CALLEXPR(CLASS) firstCallExprConstant = CLASS##Class,
+#define LAST_CALLEXPR(CLASS) lastCallExprConstant = CLASS##Class,
+#define FIRST_CASTEXPR(CLASS) firstCastExprConstant = CLASS##Class,
+#define LAST_CASTEXPR(CLASS) lastCastExprConstant = CLASS##Class,
+#define FIRST_EXPLICITCASTEXPR(CLASS) firstExplicitCastExprConstant = \
+            CLASS##Class,
+#define LAST_EXPLICITCASTEXPR(CLASS) lastExplicitCastExprConstant = \
+            CLASS##Class,
+#define FIRST_BINARYOPERATOR(CLASS) firstBinaryOperatorConstant = \
+            CLASS##Class,
+#define LAST_BINARYOPERATOR(CLASS) lastBinaryOperatorConstant = \
+            CLASS##Class,
+#define ABSTRACT(STMT)
+#include "clang/AST/StmtNodes.inc"
 };
 private:
   /// \brief The statement class.

Removed: cfe/trunk/include/clang/AST/StmtNodes.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/StmtNodes.def?rev=103086&view=auto
==============================================================================
--- cfe/trunk/include/clang/AST/StmtNodes.def (original)
+++ cfe/trunk/include/clang/AST/StmtNodes.def (removed)
@@ -1,165 +0,0 @@
-//===-- StmtNodes.def - Metadata about Stmt AST nodes -----------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-//  This file defines the AST Node info database.
-//
-//===---------------------------------------------------------------------===//
-
-#ifndef FIRST_STMT
-#define FIRST_STMT(CLASS)
-#define LAST_STMT(CLASS)
-#endif
-
-#ifndef FIRST_EXPR
-#define FIRST_EXPR(CLASS)
-#define LAST_EXPR(CLASS)
-#endif
-
-#ifndef EXPR
-#  define EXPR(Type, Base) STMT(Type, Base)
-#endif
-
-#ifndef ABSTRACT_EXPR
-#  define ABSTRACT_EXPR(Type, Base) EXPR(Type, Base)
-#endif
-
-// Normal Statements.
-STMT(NullStmt        , Stmt)
-FIRST_STMT(NullStmt)
-STMT(CompoundStmt    , Stmt)
-STMT(CaseStmt        , SwitchCase)
-STMT(DefaultStmt     , SwitchCase)
-STMT(LabelStmt       , Stmt)
-STMT(IfStmt          , Stmt)
-STMT(SwitchStmt      , Stmt)
-STMT(WhileStmt       , Stmt)
-STMT(DoStmt          , Stmt)
-STMT(ForStmt         , Stmt)
-STMT(GotoStmt        , Stmt)
-STMT(IndirectGotoStmt, Stmt)
-STMT(ContinueStmt    , Stmt)
-STMT(BreakStmt       , Stmt)
-STMT(ReturnStmt      , Stmt)
-STMT(DeclStmt        , Stmt)
-STMT(SwitchCase      , Stmt)
-
-// GNU Stmt Extensions
-STMT(AsmStmt         , Stmt)
-
-// Obj-C statements
-STMT(ObjCAtTryStmt        , Stmt)
-STMT(ObjCAtCatchStmt      , Stmt)
-STMT(ObjCAtFinallyStmt    , Stmt)
-STMT(ObjCAtThrowStmt      , Stmt)
-STMT(ObjCAtSynchronizedStmt , Stmt)
-// Obj-C2 statements
-STMT(ObjCForCollectionStmt, Stmt)
-
-// C++ statements
-STMT(CXXCatchStmt, Stmt)
-STMT(CXXTryStmt  , Stmt)
-
-LAST_STMT(CXXTryStmt)
-
-// Expressions.
-ABSTRACT_EXPR(Expr         , Stmt)
-EXPR(PredefinedExpr        , Expr)
-EXPR(DeclRefExpr           , Expr)
-EXPR(IntegerLiteral        , Expr)
-EXPR(FloatingLiteral       , Expr)
-EXPR(ImaginaryLiteral      , Expr)
-EXPR(StringLiteral         , Expr)
-EXPR(CharacterLiteral      , Expr)
-EXPR(ParenExpr             , Expr)
-EXPR(UnaryOperator         , Expr)
-EXPR(OffsetOfExpr          , Expr)
-EXPR(SizeOfAlignOfExpr     , Expr)
-EXPR(ArraySubscriptExpr    , Expr)
-EXPR(CallExpr              , Expr)
-EXPR(MemberExpr            , Expr)
-ABSTRACT_EXPR(CastExpr     , Expr)
-EXPR(BinaryOperator        , Expr)
-EXPR(CompoundAssignOperator, BinaryOperator)
-EXPR(ConditionalOperator   , Expr)
-EXPR(ImplicitCastExpr      , CastExpr)
-ABSTRACT_EXPR(ExplicitCastExpr, CastExpr)
-EXPR(CStyleCastExpr        , ExplicitCastExpr)
-EXPR(CompoundLiteralExpr   , Expr)
-EXPR(ExtVectorElementExpr  , Expr)
-EXPR(InitListExpr          , Expr)
-EXPR(DesignatedInitExpr    , Expr)
-EXPR(ImplicitValueInitExpr , Expr)
-EXPR(ParenListExpr         , Expr)
-EXPR(VAArgExpr             , Expr)
-
-// GNU Extensions.
-EXPR(AddrLabelExpr        , Expr)
-EXPR(StmtExpr             , Expr)
-EXPR(TypesCompatibleExpr  , Expr)
-EXPR(ChooseExpr           , Expr)
-EXPR(GNUNullExpr          , Expr)
-
-// C++ Expressions.
-EXPR(CXXOperatorCallExpr    , CallExpr)
-EXPR(CXXMemberCallExpr      , CallExpr)
-ABSTRACT_EXPR(CXXNamedCastExpr       , ExplicitCastExpr)
-EXPR(CXXStaticCastExpr      , CXXNamedCastExpr)
-EXPR(CXXDynamicCastExpr     , CXXNamedCastExpr)
-EXPR(CXXReinterpretCastExpr , CXXNamedCastExpr)
-EXPR(CXXConstCastExpr       , CXXNamedCastExpr)
-EXPR(CXXFunctionalCastExpr  , ExplicitCastExpr)
-EXPR(CXXTypeidExpr          , Expr)
-EXPR(CXXBoolLiteralExpr     , Expr)
-EXPR(CXXNullPtrLiteralExpr  , Expr)
-EXPR(CXXThisExpr            , Expr)
-EXPR(CXXThrowExpr           , Expr)
-EXPR(CXXDefaultArgExpr      , Expr)
-EXPR(CXXZeroInitValueExpr   , Expr)
-EXPR(CXXNewExpr             , Expr)
-EXPR(CXXDeleteExpr          , Expr)
-EXPR(CXXPseudoDestructorExpr, Expr)
-EXPR(UnresolvedLookupExpr   , Expr)
-EXPR(UnaryTypeTraitExpr     , Expr)
-EXPR(DependentScopeDeclRefExpr  , Expr)
-EXPR(CXXConstructExpr       , Expr)
-EXPR(CXXBindTemporaryExpr   , Expr)
-EXPR(CXXBindReferenceExpr   , Expr)
-EXPR(CXXExprWithTemporaries , Expr)
-EXPR(CXXTemporaryObjectExpr , CXXConstructExpr)
-EXPR(CXXUnresolvedConstructExpr, Expr)
-EXPR(CXXDependentScopeMemberExpr, Expr)
-EXPR(UnresolvedMemberExpr   , Expr)
-
-// Obj-C Expressions.
-EXPR(ObjCStringLiteral    , Expr)
-EXPR(ObjCEncodeExpr       , Expr)
-EXPR(ObjCMessageExpr      , Expr)
-EXPR(ObjCSelectorExpr     , Expr)
-EXPR(ObjCProtocolExpr     , Expr)
-EXPR(ObjCIvarRefExpr      , Expr)
-EXPR(ObjCPropertyRefExpr  , Expr)
-EXPR(ObjCImplicitSetterGetterRefExpr , Expr)
-EXPR(ObjCSuperExpr        , Expr)
-EXPR(ObjCIsaExpr          , Expr)
-
-// Clang Extensions.
-EXPR(ShuffleVectorExpr    , Expr)
-EXPR(BlockExpr            , Expr)
-EXPR(BlockDeclRefExpr     , Expr)
-
-FIRST_EXPR(PredefinedExpr)
-LAST_EXPR(BlockDeclRefExpr)
-
-#undef ABSTRACT_EXPR
-#undef EXPR
-#undef STMT
-#undef FIRST_STMT
-#undef LAST_STMT
-#undef FIRST_EXPR
-#undef LAST_EXPR

Added: cfe/trunk/include/clang/AST/StmtNodes.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/StmtNodes.td?rev=103087&view=auto
==============================================================================
--- cfe/trunk/include/clang/AST/StmtNodes.td (added)
+++ cfe/trunk/include/clang/AST/StmtNodes.td Wed May  5 10:24:00 2010
@@ -0,0 +1,127 @@
+class Stmt<bit abstract = 0> {
+  bit Abstract = abstract;
+}
+
+class DStmt<Stmt base, bit abstract = 0> : Stmt<abstract> {
+  Stmt Base = base;
+}
+
+// Statements
+def NullStmt : Stmt;
+def CompoundStmt : Stmt;
+def LabelStmt : Stmt;
+def IfStmt : Stmt;
+def SwitchStmt : Stmt;
+def WhileStmt : Stmt;
+def DoStmt : Stmt;
+def ForStmt : Stmt;
+def GotoStmt : Stmt;
+def IndirectGotoStmt : Stmt;
+def ContinueStmt : Stmt;
+def BreakStmt : Stmt;
+def ReturnStmt : Stmt;
+def DeclStmt  : Stmt;
+def SwitchCase : Stmt;
+def CaseStmt : DStmt<SwitchCase>;
+def DefaultStmt : DStmt<SwitchCase>;
+
+// GNU Extensions
+def AsmStmt : Stmt;
+
+// Obj-C statements
+def ObjCAtTryStmt : Stmt;
+def ObjCAtCatchStmt : Stmt;
+def ObjCAtFinallyStmt : Stmt;
+def ObjCAtThrowStmt : Stmt;
+def ObjCAtSynchronizedStmt : Stmt;
+def ObjCForCollectionStmt : Stmt;
+
+// C++ statments
+def CXXCatchStmt : Stmt;
+def CXXTryStmt : Stmt;
+
+// Expressions
+def Expr : Stmt<1>;
+def PredefinedExpr : DStmt<Expr>;
+def DeclRefExpr : DStmt<Expr>;
+def IntegerLiteral : DStmt<Expr>;
+def FloatingLiteral : DStmt<Expr>;
+def ImaginaryLiteral : DStmt<Expr>;
+def StringLiteral : DStmt<Expr>;
+def CharacterLiteral : DStmt<Expr>;
+def ParenExpr : DStmt<Expr>;
+def UnaryOperator : DStmt<Expr>;
+def OffsetOfExpr : DStmt<Expr>;
+def SizeOfAlignOfExpr : DStmt<Expr>;
+def ArraySubscriptExpr : DStmt<Expr>;
+def CallExpr : DStmt<Expr>;
+def MemberExpr : DStmt<Expr>;
+def CastExpr : DStmt<Expr, 1>;
+def BinaryOperator : DStmt<Expr>;
+def CompoundAssignOperator : DStmt<BinaryOperator>;
+def ConditionalOperator : DStmt<Expr>;
+def ImplicitCastExpr : DStmt<CastExpr>;
+def ExplicitCastExpr : DStmt<CastExpr, 1>;
+def CStyleCastExpr : DStmt<ExplicitCastExpr>;
+def CompoundLiteralExpr : DStmt<Expr>;
+def ExtVectorElementExpr : DStmt<Expr>;
+def InitListExpr : DStmt<Expr>;
+def DesignatedInitExpr : DStmt<Expr>;
+def ImplicitValueInitExpr : DStmt<Expr>;
+def ParenListExpr : DStmt<Expr>;
+def VAArgExpr : DStmt<Expr>;
+
+// GNU Extensions.
+def AddrLabelExpr : DStmt<Expr>;
+def StmtExpr : DStmt<Expr>;
+def TypesCompatibleExpr : DStmt<Expr>;
+def ChooseExpr : DStmt<Expr>;
+def GNUNullExpr : DStmt<Expr>;
+
+// C++ Expressions.
+def CXXOperatorCallExpr : DStmt<CallExpr>;
+def CXXMemberCallExpr : DStmt<CallExpr>;
+def CXXNamedCastExpr : DStmt<ExplicitCastExpr, 1>;
+def CXXStaticCastExpr : DStmt<CXXNamedCastExpr>;
+def CXXDynamicCastExpr : DStmt<CXXNamedCastExpr>;
+def CXXReinterpretCastExpr : DStmt<CXXNamedCastExpr>;
+def CXXConstCastExpr : DStmt<CXXNamedCastExpr>;
+def CXXFunctionalCastExpr : DStmt<ExplicitCastExpr>;
+def CXXTypeidExpr : DStmt<Expr>;
+def CXXBoolLiteralExpr : DStmt<Expr>;
+def CXXNullPtrLiteralExpr : DStmt<Expr>;
+def CXXThisExpr : DStmt<Expr>;
+def CXXThrowExpr : DStmt<Expr>;
+def CXXDefaultArgExpr : DStmt<Expr>;
+def CXXZeroInitValueExpr : DStmt<Expr>;
+def CXXNewExpr : DStmt<Expr>;
+def CXXDeleteExpr : DStmt<Expr>;
+def CXXPseudoDestructorExpr : DStmt<Expr>;
+def UnresolvedLookupExpr : DStmt<Expr>;
+def UnaryTypeTraitExpr : DStmt<Expr>;
+def DependentScopeDeclRefExpr : DStmt<Expr>;
+def CXXConstructExpr : DStmt<Expr>;
+def CXXBindTemporaryExpr : DStmt<Expr>;
+def CXXBindReferenceExpr : DStmt<Expr>;
+def CXXExprWithTemporaries : DStmt<Expr>;
+def CXXTemporaryObjectExpr : DStmt<CXXConstructExpr>;
+def CXXUnresolvedConstructExpr : DStmt<Expr>;
+def CXXDependentScopeMemberExpr : DStmt<Expr>;
+def UnresolvedMemberExpr : DStmt<Expr>;
+
+// Obj-C Expressions.
+def ObjCStringLiteral : DStmt<Expr>;
+def ObjCEncodeExpr : DStmt<Expr>;
+def ObjCMessageExpr : DStmt<Expr>;
+def ObjCSelectorExpr : DStmt<Expr>;
+def ObjCProtocolExpr : DStmt<Expr>;
+def ObjCIvarRefExpr : DStmt<Expr>;
+def ObjCPropertyRefExpr : DStmt<Expr>;
+def ObjCImplicitSetterGetterRefExpr : DStmt<Expr>;
+def ObjCSuperExpr : DStmt<Expr>;
+def ObjCIsaExpr : DStmt<Expr>;
+
+// Clang Extensions.
+def ShuffleVectorExpr : DStmt<Expr>;
+def BlockExpr : DStmt<Expr>;
+def BlockDeclRefExpr : DStmt<Expr>;

Modified: cfe/trunk/include/clang/AST/StmtVisitor.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/StmtVisitor.h?rev=103087&r1=103086&r2=103087&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/StmtVisitor.h (original)
+++ cfe/trunk/include/clang/AST/StmtVisitor.h Wed May  5 10:24:00 2010
@@ -105,10 +105,10 @@
     // Top switch stmt: dispatch to VisitFooStmt for each FooStmt.
     switch (S->getStmtClass()) {
     default: assert(0 && "Unknown stmt kind!");
-#define ABSTRACT_EXPR(CLASS, PARENT)
+#define ABSTRACT(STMT)
 #define STMT(CLASS, PARENT)                              \
     case Stmt::CLASS ## Class: DISPATCH(CLASS, CLASS);
-#include "clang/AST/StmtNodes.def"
+#include "clang/AST/StmtNodes.inc"
     }
   }
 
@@ -116,7 +116,7 @@
   // back on VisitExpr or whatever else is the superclass.
 #define STMT(CLASS, PARENT)                                   \
   RetTy Visit ## CLASS(CLASS *S) { DISPATCH(PARENT, PARENT); }
-#include "clang/AST/StmtNodes.def"
+#include "clang/AST/StmtNodes.inc"
 
   // If the implementation doesn't implement binary operator methods, fall back
   // on VisitBinaryOperator.

Modified: cfe/trunk/include/clang/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/CMakeLists.txt?rev=103087&r1=103086&r2=103087&view=diff
==============================================================================
--- cfe/trunk/include/clang/CMakeLists.txt (original)
+++ cfe/trunk/include/clang/CMakeLists.txt Wed May  5 10:24:00 2010
@@ -1,2 +1,3 @@
+add_subdirectory(AST)
 add_subdirectory(Basic)
 add_subdirectory(Driver)

Modified: cfe/trunk/include/clang/Makefile
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Makefile?rev=103087&r1=103086&r2=103087&view=diff
==============================================================================
--- cfe/trunk/include/clang/Makefile (original)
+++ cfe/trunk/include/clang/Makefile Wed May  5 10:24:00 2010
@@ -1,5 +1,5 @@
 LEVEL = ../../../..
-DIRS := Basic Driver
+DIRS := AST Basic Driver
 
 include $(LEVEL)/Makefile.common
 

Modified: cfe/trunk/lib/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Expr.cpp?rev=103087&r1=103086&r2=103087&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Expr.cpp (original)
+++ cfe/trunk/lib/AST/Expr.cpp Wed May  5 10:24:00 2010
@@ -1810,7 +1810,7 @@
   switch (E->getStmtClass()) {
 #define STMT(Node, Base) case Expr::Node##Class:
 #define EXPR(Node, Base)
-#include "clang/AST/StmtNodes.def"
+#include "clang/AST/StmtNodes.inc"
   case Expr::PredefinedExprClass:
   case Expr::FloatingLiteralClass:
   case Expr::ImaginaryLiteralClass:

Modified: cfe/trunk/lib/AST/Stmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Stmt.cpp?rev=103087&r1=103086&r2=103087&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Stmt.cpp (original)
+++ cfe/trunk/lib/AST/Stmt.cpp Wed May  5 10:24:00 2010
@@ -27,7 +27,7 @@
   const char *Name;
   unsigned Counter;
   unsigned Size;
-} StmtClassInfo[Stmt::lastExprConstant+1];
+} StmtClassInfo[Stmt::lastStmtConstant+1];
 
 static StmtClassNameTable &getStmtInfoTableEntry(Stmt::StmtClass E) {
   static bool Initialized = false;
@@ -36,11 +36,11 @@
 
   // Intialize the table on the first use.
   Initialized = true;
-#define ABSTRACT_EXPR(CLASS, PARENT)
+#define ABSTRACT(STMT)
 #define STMT(CLASS, PARENT) \
   StmtClassInfo[(unsigned)Stmt::CLASS##Class].Name = #CLASS;    \
   StmtClassInfo[(unsigned)Stmt::CLASS##Class].Size = sizeof(CLASS);
-#include "clang/AST/StmtNodes.def"
+#include "clang/AST/StmtNodes.inc"
 
   return StmtClassInfo[E];
 }
@@ -55,13 +55,13 @@
 
   unsigned sum = 0;
   fprintf(stderr, "*** Stmt/Expr Stats:\n");
-  for (int i = 0; i != Stmt::lastExprConstant+1; i++) {
+  for (int i = 0; i != Stmt::lastStmtConstant+1; i++) {
     if (StmtClassInfo[i].Name == 0) continue;
     sum += StmtClassInfo[i].Counter;
   }
   fprintf(stderr, "  %d stmts/exprs total.\n", sum);
   sum = 0;
-  for (int i = 0; i != Stmt::lastExprConstant+1; i++) {
+  for (int i = 0; i != Stmt::lastStmtConstant+1; i++) {
     if (StmtClassInfo[i].Name == 0) continue;
     if (StmtClassInfo[i].Counter == 0) continue;
     fprintf(stderr, "    %d %s, %d each (%d bytes)\n",

Modified: cfe/trunk/lib/AST/StmtPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/StmtPrinter.cpp?rev=103087&r1=103086&r2=103087&view=diff
==============================================================================
--- cfe/trunk/lib/AST/StmtPrinter.cpp (original)
+++ cfe/trunk/lib/AST/StmtPrinter.cpp Wed May  5 10:24:00 2010
@@ -89,7 +89,7 @@
     void VisitStmt(Stmt *Node);
 #define STMT(CLASS, PARENT) \
     void Visit##CLASS(CLASS *Node);
-#include "clang/AST/StmtNodes.def"
+#include "clang/AST/StmtNodes.inc"
   };
 }
 

Modified: cfe/trunk/lib/AST/StmtProfile.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/StmtProfile.cpp?rev=103087&r1=103086&r2=103087&view=diff
==============================================================================
--- cfe/trunk/lib/AST/StmtProfile.cpp (original)
+++ cfe/trunk/lib/AST/StmtProfile.cpp Wed May  5 10:24:00 2010
@@ -36,7 +36,7 @@
     void VisitStmt(Stmt *S);
 
 #define STMT(Node, Base) void Visit##Node(Node *S);
-#include "clang/AST/StmtNodes.def"
+#include "clang/AST/StmtNodes.inc"
 
     /// \brief Visit a declaration that is referenced within an expression
     /// or statement.

Modified: cfe/trunk/lib/CodeGen/Mangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/Mangle.cpp?rev=103087&r1=103086&r2=103087&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/Mangle.cpp (original)
+++ cfe/trunk/lib/CodeGen/Mangle.cpp Wed May  5 10:24:00 2010
@@ -1369,7 +1369,7 @@
 #define EXPR(Type, Base)
 #define STMT(Type, Base) \
   case Expr::Type##Class:
-#include "clang/AST/StmtNodes.def"
+#include "clang/AST/StmtNodes.inc"
     llvm_unreachable("unexpected statement kind");
     break;
 

Modified: cfe/trunk/lib/Sema/TreeTransform.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/TreeTransform.h?rev=103087&r1=103086&r2=103087&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/TreeTransform.h (original)
+++ cfe/trunk/lib/Sema/TreeTransform.h Wed May  5 10:24:00 2010
@@ -344,8 +344,8 @@
   OwningStmtResult Transform##Node(Node *S);
 #define EXPR(Node, Parent)                        \
   OwningExprResult Transform##Node(Node *E);
-#define ABSTRACT_EXPR(Node, Parent)
-#include "clang/AST/StmtNodes.def"
+#define ABSTRACT(Stmt)
+#include "clang/AST/StmtNodes.inc"
 
   /// \brief Build a new pointer type given its pointee type.
   ///
@@ -1966,13 +1966,13 @@
 #define STMT(Node, Parent)                                              \
   case Stmt::Node##Class: return getDerived().Transform##Node(cast<Node>(S));
 #define EXPR(Node, Parent)
-#include "clang/AST/StmtNodes.def"
+#include "clang/AST/StmtNodes.inc"
 
   // Transform expressions by calling TransformExpr.
 #define STMT(Node, Parent)
-#define ABSTRACT_EXPR(Node, Parent)
+#define ABSTRACT(Stmt)
 #define EXPR(Node, Parent) case Stmt::Node##Class:
-#include "clang/AST/StmtNodes.def"
+#include "clang/AST/StmtNodes.inc"
     {
       Sema::OwningExprResult E = getDerived().TransformExpr(cast<Expr>(S));
       if (E.isInvalid())
@@ -1994,10 +1994,10 @@
   switch (E->getStmtClass()) {
     case Stmt::NoStmtClass: break;
 #define STMT(Node, Parent) case Stmt::Node##Class: break;
-#define ABSTRACT_EXPR(Node, Parent)
+#define ABSTRACT(Stmt)
 #define EXPR(Node, Parent)                                              \
     case Stmt::Node##Class: return getDerived().Transform##Node(cast<Node>(E));
-#include "clang/AST/StmtNodes.def"
+#include "clang/AST/StmtNodes.inc"
   }
 
   return SemaRef.Owned(E->Retain());





More information about the cfe-commits mailing list